[ArPow Tarball] Tier 1 - Add roslyn repo to arpow tarball (#11142)

Co-authored-by: Michael Simons <msimons@microsoft.com>
This commit is contained in:
Chris Rummel 2021-07-22 16:34:51 -05:00 committed by GitHub
parent f234c8554a
commit 7841b20804
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 138 additions and 84 deletions

View file

@ -1,16 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Build" Version="17.0.0-preview-21330-06" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>cdc5faeda066a83b084c96b8a455ad0a5e8713ab</Sha>
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
<Dependency Name="Microsoft.DotNet.Cli.CommandLine" Version="1.0.0-preview.21310.2">
<Uri>https://github.com/dotnet/clicommandlineparser</Uri>
<Sha>3198bf5660cad3dab85f5475bf1fda9688146e3f</Sha>
<SourceBuild RepoName="clicommandlineparser" ManagedOnly="true" />
</Dependency>
<Dependency Name="System.CommandLine" Version="0.1.230801">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>5e855e911de7c56fe28400c4500e888fe2a3da8e</Sha>
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="5.0.0-preview.21325.1">
<Uri>https://github.com/dotnet/diagnostics</Uri>
<Sha>6f48c2ae749c29b687af0353e6c2a9590d7e3d22</Sha>
<SourceBuild RepoName="diagnostics" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="5.0.3-beta.21352.5" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>3af67cd8ffd73b2dc443e1e24dc0cf28f7e1c608</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21321.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/mono/linker</Uri>
<Sha>f2588193553431636b9853b0f87209fa395a72c5</Sha>
<SourceBuild RepoName="linker" ManagedOnly="true" />
<RepoName>linker</RepoName>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.0.0-preview-21330-06" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>cdc5faeda066a83b084c96b8a455ad0a5e8713ab</Sha>
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.0.0-2.21356.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>d16c8bd011951d9bd15809d9004276cf7baaa786</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DiaSymReader" Version="1.4.0-beta2-21315-01">
<Uri>https://github.com/dotnet/symreader</Uri>
<Sha>1968a003d845d119a9d38ac4daaeea22897f7daf</Sha>
@ -26,36 +52,15 @@
<Sha>6898c1c70c2d14e9725ddab6e1ebe8084c4d7e27</Sha>
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21321.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/mono/linker</Uri>
<Sha>f2588193553431636b9853b0f87209fa395a72c5</Sha>
<SourceBuild RepoName="linker" ManagedOnly="true" />
<RepoName>linker</RepoName>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.0-preview-20210629-04" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>e078bbadaf65628c313e97041973db52a84491ef</Sha>
<SourceBuild RepoName="vstest" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Web.Xdt" Version="5.0.0-preview.21302.1">
<Uri>https://github.com/dotnet/xdt</Uri>
<Sha>6a46e7c886cdf499ba3433f665ab417be814135e</Sha>
<SourceBuild RepoName="xdt" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Cli.CommandLine" Version="1.0.0-preview.21310.2">
<Uri>https://github.com/dotnet/clicommandlineparser</Uri>
<Sha>3198bf5660cad3dab85f5475bf1fda9688146e3f</Sha>
<SourceBuild RepoName="clicommandlineparser" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="5.0.3-beta.21352.5" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>3af67cd8ffd73b2dc443e1e24dc0cf28f7e1c608</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="System.CommandLine" Version="0.1.230801">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>5e855e911de7c56fe28400c4500e888fe2a3da8e</Sha>
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.0.0-preview-20210629-04" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>e078bbadaf65628c313e97041973db52a84491ef</Sha>
<SourceBuild RepoName="vstest" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
@ -64,20 +69,20 @@
<Sha>a3377cccde8639089f99107e2ba5df2c8cbe6394</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-alpha.1.21359.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>8cfb504dabb5881e5bb22b36035ecc72d7426fdd</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-21309-01" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>4b584dbc392bb1aad49c2eb1ab84d8b489b6dccc</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="0.1.0-alpha.1.21318.1">
<Uri>https://github.com/dotnet/source-build</Uri>
<Sha>3fb25b8db3bec654e37e71a5b2b7fde14444bc2f</Sha>
<SourceBuild RepoName="source-build" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-21309-01" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>4b584dbc392bb1aad49c2eb1ab84d8b489b6dccc</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-alpha.1.21359.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>8cfb504dabb5881e5bb22b36035ecc72d7426fdd</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="XliffTasks" Version="1.0.0-beta.21325.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>

View file

@ -0,0 +1,27 @@
From eb67cc234b0073d8b210c3ae42b5efe481bd0900 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Tue, 20 Jul 2021 09:41:52 -0500
Subject: [PATCH 1/2] Patch out version check for source-build scenarios.
The immediate cause for removing this was that NuGet is not yet built at this point in the source-build process. Roslyn tries to use a reference package to run this task but fails (the usual "reference packages cannot be used at runtime" error). Additionally, this is not really a valid check in source-build - we give each repo the SDK and MSBuild that we expect it to use, and want to override its opinions about what it should be using.
---
eng/targets/Imports.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/targets/Imports.targets b/eng/targets/Imports.targets
index 15b067deb04..303b10c40cd 100644
--- a/eng/targets/Imports.targets
+++ b/eng/targets/Imports.targets
@@ -159,7 +159,7 @@
<UsingTask TaskName="Microsoft.DotNet.Arcade.Sdk.CompareVersions" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.DotNet.Arcade.Sdk.SingleError" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
- <Target Name="_CheckRequiredMSBuildVersion" BeforeTargets="BeforeBuild">
+ <Target Name="_CheckRequiredMSBuildVersion" BeforeTargets="BeforeBuild" Condition="'$(DotNetBuildFromSource)' != 'true'">
<CompareVersions Left="$(MSBuildVersion)" Right="$(MinimumMSBuildVersion)">
<Output TaskParameter="Result" PropertyName="_VersionComparisonResult"/>
</CompareVersions>
--
2.18.0

View file

@ -0,0 +1,65 @@
From a235579b23a9aaf3f30202a69e92b93f7c569107 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Tue, 20 Jul 2021 14:20:14 -0500
Subject: [PATCH 2/2] Don't include desktop artifacts that don't exist in
source-build.
This fixes a bad intersection of a couple of things going on in the source-build Roslyn build.
- Roslyn.Extensions project that builds before this normally will restore a net46 version of System.Numerics.Vectors, but it sets it to CopyLocal and is building for net472, so this net46 DLL is output to the net472 folder.
- We don't build Roslyn.Extensions for net472 for other reasons, so we are missing this DLL but not the output from that project (we just get the .NET Core folders).
- DesktopCompilerArtifacts tries to specifically call out the System.Numerics.Vectors (and some other) DLLs because they are treated differently (NGEN is not supported for them).
- So the missing DLL, instead of just being ignored because of a wildcard, comes up as error trying to build these packages.
- We want full-framework Roslyn artifacts downstream but we don't ever run the fullfx Roslyn compiler, so we need these packages but not the CopyLocal fullfx DLLs.
So we keep the net472 build for these but remove the specifically-called out artifacts that we don't need.
---
.../Microsoft.Net.Compilers.Toolset.Package.csproj | 4 ++--
.../Microsoft.Net.Compilers.Package.csproj | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj b/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj
index 9e646ebab5b..7b598978fd1 100644
--- a/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj
+++ b/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj
@@ -23,7 +23,7 @@
<!-- Remove NU5128 once https://github.com/NuGet/Home/issues/8583 is fixed -->
<NoWarn>$(NoWarn);NU5100;NU5128</NoWarn>
- <_DependsOn Condition="'$(TargetFramework)' == 'net472'">InitializeDesktopCompilerArtifacts</_DependsOn>
+ <_DependsOn Condition="'$(TargetFramework)' == 'net472' and '$(DotNetBuildFromSource)' != 'true'">InitializeDesktopCompilerArtifacts</_DependsOn>
<_DependsOn Condition="'$(TargetFramework)' == 'netcoreapp3.1'">InitializeCoreClrCompilerArtifacts</_DependsOn>
</PropertyGroup>
@@ -57,6 +57,6 @@
</ItemGroup>
</Target>
- <Import Project="DesktopCompilerArtifacts.targets" Condition="'$(TargetFramework)' == 'net472'" />
+ <Import Project="DesktopCompilerArtifacts.targets" Condition="'$(TargetFramework)' == 'net472' and '$(DotNetBuildFromSource)' != 'true'" />
<Import Project="CoreClrCompilerArtifacts.targets" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" />
</Project>
diff --git a/src/NuGet/Microsoft.Net.Compilers/Microsoft.Net.Compilers.Package.csproj b/src/NuGet/Microsoft.Net.Compilers/Microsoft.Net.Compilers.Package.csproj
index 05f74e26ce6..c33e557c249 100644
--- a/src/NuGet/Microsoft.Net.Compilers/Microsoft.Net.Compilers.Package.csproj
+++ b/src/NuGet/Microsoft.Net.Compilers/Microsoft.Net.Compilers.Package.csproj
@@ -31,13 +31,13 @@
<Target Name="_GetFilesToPackage" DependsOnTargets="InitializeDesktopCompilerArtifacts">
<ItemGroup>
- <_File Include="@(DesktopCompilerArtifact)" TargetDir="tools"/>
- <_File Include="@(DesktopCompilerResourceArtifact)" TargetDir="tools"/>
+ <_File Include="@(DesktopCompilerArtifact)" TargetDir="tools" Condition="'$(DotNetBuildFromSource)' != 'true'" />
+ <_File Include="@(DesktopCompilerResourceArtifact)" TargetDir="tools" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<_File Include="$(MSBuildProjectDirectory)\build\**\*.*" TargetDir="build" />
<TfmSpecificPackageFile Include="@(_File)" PackagePath="%(_File.TargetDir)/%(_File.RecursiveDir)%(_File.FileName)%(_File.Extension)" />
</ItemGroup>
</Target>
- <Import Project="..\Microsoft.Net.Compilers.Toolset\DesktopCompilerArtifacts.targets"/>
+ <Import Project="..\Microsoft.Net.Compilers.Toolset\DesktopCompilerArtifacts.targets" />
</Project>
--
2.18.0

View file

@ -34,6 +34,7 @@
<RepositoryReference Include="clicommandlineparser" />
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="test-templates" />

View file

@ -1,25 +1,15 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="ReplaceTextInFiles" />
<PropertyGroup>
<BuildCommandArgs>--restore --build --pack</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) --configuration $(Configuration)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) -v $(LogVerbosity)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) -bl</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:TreatWarningsAsErrors=false</BuildCommandArgs>
<!-- Versioning args. -->
<BuildCommandArgs>$(BuildCommandArgs) /p:OfficialBuild=true</BuildCommandArgs>
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:ApplyPartialNgenOptimization=false</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:EnablePartialNgenOptimization=false</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:PublishWindowsPdb=false</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DotNetBuildFromSource=true</BuildCommandArgs>
<!-- UsingToolMicrosoftNetCompilers=false introduces a prebuilt so we'll have to turn back on after our bootstrap SDK has native integer support -->
<!-- issue: https://github.com/dotnet/source-build/issues/1719 -->
<BuildCommandArgs>$(BuildCommandArgs) /p:UsingToolMicrosoftNetCompilers=false</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:RepoRoot=$(ProjectDirectory)</BuildCommandArgs>
<BuildCommand>$(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
@ -28,17 +18,10 @@
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
</PropertyGroup>
<ItemGroup>
<PackProjects Include="$(ProjectDirectory)src/NuGet/Microsoft.NETCore.Compilers/Microsoft.NETCore.Compilers.Package.csproj" />
<PackProjects Include="$(ProjectDirectory)src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj" />
<PackProjects Include="$(ProjectDirectory)src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj" />
<PackProjects Include="$(ProjectDirectory)src/Workspaces/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Workspaces.csproj" />
</ItemGroup>
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="humanizer" />
<RepositoryReference Include="source-build" />
<RepositoryReference Include="xliff-tasks" />
</ItemGroup>
@ -46,32 +29,5 @@
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>
<!--
Some internal utility APIs implemented by dotnet/roslyn have the same name
as types that were officially added to .NET in 5.0. That means that when we
target 'net5.0', they are sometimes ambiguous. The .NET 5.0 and Roslyn
versions of these types are not compatible, so we need to keep using the
internal implementation. This target renames the internal Roslyn types to
make them unambiguous to the compiler.
-->
<Target Name="MangleInternalApiNamesOverlappingWithNet50"
BeforeTargets="Build">
<ItemGroup>
<RoslynSourceFile Include="$(ProjectDirectory)**\*.cs" />
<RoslynSourceFile Include="$(ProjectDirectory)**\*.vb" />
</ItemGroup>
<!-- Stick 'Roslyn' in the middle of the new text for some idempotence. -->
<ReplaceTextInFiles
InputFiles="@(RoslynSourceFile)"
OldText="IReadOnlySet"
NewText="IRoslynReadOnlySet" />
<ReplaceTextInFiles
InputFiles="@(RoslynSourceFile)"
OldText="ReferenceEqualityComparer"
NewText="ReferenceEqualityRoslynComparer" />
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>