From e6c92089651222722100b99ae05c05c76add83bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Thu, 25 Aug 2022 20:57:31 +0200 Subject: [PATCH] Handle source-build patches in VMR initialization (#14397) - Bumps to a new version of DarcLib that handles SB patches - Configures the VMR to point to tarball patches - Adds a missing `llvm-project` mapping --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- .../tarball/content/src/source-mappings.json | 10 +++++++++- .../Tasks/VirtualMonoRepo_Initialize.cs | 9 +++------ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dcafdd280..cc17bac0a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -213,9 +213,9 @@ https://github.com/dotnet/arcade 258a37cd6a7884f771d0f991d9f24d29e292abd0 - + https://github.com/dotnet/arcade-services - a27d5e56acf479b4a0944a0cf4511acb22d4a75b + af1ca588ca991b9b570725581f7c7a4580629d3d https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 32c365eb1..ac3348ac8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -30,7 +30,7 @@ - 1.1.0-beta.22422.1 + 1.1.0-beta.22425.1 diff --git a/src/SourceBuild/tarball/content/src/source-mappings.json b/src/SourceBuild/tarball/content/src/source-mappings.json index 3144d9e23..7a21f4f5b 100644 --- a/src/SourceBuild/tarball/content/src/source-mappings.json +++ b/src/SourceBuild/tarball/content/src/source-mappings.json @@ -1,4 +1,5 @@ { + "patchesPath": "src/installer/src/SourceBuild/tarball/patches", "defaults": { "defaultRef": "main", "exclude": [ @@ -58,12 +59,19 @@ { "name": "installer", "defaultRemote": "https://github.com/dotnet/installer", - "defaultRef": "vmr" + "exclude": [ + "src/SourceBuild/tarball/content/**/*" + ] }, { "name": "linker", "defaultRemote": "https://github.com/dotnet/linker" }, + { + "name": "llvm-project", + "defaultRemote": "https://github.com/dotnet/llvm-project", + "defaultRef": "dotnet/main" + }, { "name": "msbuild", "defaultRemote": "https://github.com/dotnet/msbuild" diff --git a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs index 721bef092..dd977ff87 100644 --- a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs +++ b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs @@ -39,9 +39,8 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask private async Task ExecuteAsync() { - var factory = _serviceProvider.Value.GetRequiredService(); - var vmrManager = await factory.CreateVmrManager(_serviceProvider.Value, VmrPath, TmpPath); - await vmrManager.InitializeVmr(Repository, Revision, false, _cancellationToken.Token); + var vmrInitializer = _serviceProvider.Value.GetRequiredService(); + await vmrInitializer.InitializeVmr(Repository, Revision, false, _cancellationToken.Token); return true; } @@ -49,9 +48,7 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask private IServiceProvider CreateServiceProvider() => new ServiceCollection() .AddLogging(b => b.AddConsole().AddFilter(l => l >= LogLevel.Information)) - .AddTransient(sp => ActivatorUtilities.CreateInstance(sp, "git")) - .AddSingleton() - .AddSingleton() .AddSingleton(sp => ActivatorUtilities.CreateInstance(sp, TmpPath)) + .AddVmrManagers("git", sp => new VmrManagerConfiguration(VmrPath, TmpPath)) .BuildServiceProvider(); }