-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply source-build patches #58727
Apply source-build patches #58727
Changes from 12 commits
35d6ebc
a8ee96d
077fcca
f3142bf
f0d0e9a
101eac5
912ab07
672e329
8df52ca
56dc22b
3e570b5
c91e00b
b5bb06b
35464c3
caa111e
d3189c0
ad01398
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,17 +54,6 @@ | |
<HumanizerCoreVersion>2.2.0</HumanizerCoreVersion> | ||
<ICSharpCodeDecompilerVersion>7.1.0.6543</ICSharpCodeDecompilerVersion> | ||
<MicrosoftBuildLocatorVersion>1.4.1</MicrosoftBuildLocatorVersion> | ||
<!-- | ||
SourceBuild will requires that all dependencies also be source buildable. We are referencing a | ||
version of MSBuild that is not SourceBuild compatible, which makes our build incompatible. Since we only | ||
use these dependencies as reference assemblies, we can opt them out of this behavior by having their | ||
version variable be prefixed with `RefOnly`. This will allow us to reference these libraries and remain | ||
Source Build compatible. | ||
--> | ||
<RefOnlyMicrosoftBuildVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildVersion> | ||
<RefOnlyMicrosoftBuildFrameworkVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildFrameworkVersion> | ||
<RefOnlyMicrosoftBuildRuntimeVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildRuntimeVersion> | ||
<RefOnlyMicrosoftBuildTasksCoreVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildTasksCoreVersion> | ||
<NuGetVisualStudioContractsVersion>6.0.0-preview.0.15</NuGetVisualStudioContractsVersion> | ||
<MicrosoftVisualStudioRpcContractsVersion>17.0.51</MicrosoftVisualStudioRpcContractsVersion> | ||
<!-- | ||
|
@@ -274,6 +263,21 @@ | |
<SystemCollectionsImmutableVersion>5.0.0</SystemCollectionsImmutableVersion> | ||
<SystemReflectionMetadataVersion>5.0.0</SystemReflectionMetadataVersion> | ||
<MicrosoftBclAsyncInterfacesVersion>6.0.0</MicrosoftBclAsyncInterfacesVersion> | ||
<!-- | ||
SourceBuild will requires that all dependencies also be source buildable. We are referencing a | ||
version of MSBuild that is not SourceBuild compatible, which makes our build incompatible. Since we only | ||
use these dependencies as reference assemblies, we can opt them out of this behavior by having their | ||
version variable be prefixed with `RefOnly`. This will allow us to reference these libraries and remain | ||
Source Build compatible. | ||
--> | ||
<RefOnlyMicrosoftBuildVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildVersion> | ||
<RefOnlyMicrosoftBuildFrameworkVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildFrameworkVersion> | ||
<RefOnlyMicrosoftBuildRuntimeVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildRuntimeVersion> | ||
<RefOnlyMicrosoftBuildTasksCoreVersion>$(RefOnlyMicrosoftBuildPackagesVersion)</RefOnlyMicrosoftBuildTasksCoreVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❔ Is there a reason this needs to move to the bottom of the file? |
||
<SourceBuildLiftedSystemCollectionsImmutableVersion Condition="'$(SourceBuildLiftedSystemCollectionsImmutableVersion)' == ''">$(SystemCollectionsImmutableVersion)</SourceBuildLiftedSystemCollectionsImmutableVersion> | ||
<SourceBuildLiftedSystemReflectionMetadataVersion Condition="'$(SourceBuildLiftedSystemReflectionMetadataVersion)' == ''">$(SystemReflectionMetadataVersion)</SourceBuildLiftedSystemReflectionMetadataVersion> | ||
<SourceBuildLiftedSystemRuntimeCompilerServicesUnsafeVersion Condition="'$(SourceBuildLiftedSystemRuntimeCompilerServicesUnsafeVersion)' == ''">$(SystemRuntimeCompilerServicesUnsafeVersion)</SourceBuildLiftedSystemRuntimeCompilerServicesUnsafeVersion> | ||
<SourceBuildLiftedSystemTextEncodingCodePagesVersion Condition="'$(SourceBuildLiftedSystemTextEncodingCodePagesVersion)' == ''">$(SystemTextEncodingCodePagesVersion)</SourceBuildLiftedSystemTextEncodingCodePagesVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ What is |
||
</PropertyGroup> | ||
<PropertyGroup> | ||
<UsingToolPdbConverter>true</UsingToolPdbConverter> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,27 @@ | |
<!-- Make sure to reference the same version of Microsoft.CodeAnalysis.Analyzers as the rest of the build --> | ||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="$(MicrosoftCodeAnalysisAnalyzersVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- If we're building the command line tool, we have to include some dependencies used for grammar generation --> | ||
<Compile Include="..\..\..\..\..\Compilers\Core\Portable\Symbols\WellKnownMemberNames.cs" Link="Grammar\WellKnownMemberNames.cs" Condition="'$(TargetFramework)' != 'netstandard2.0'" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Declarations\DeclarationModifiers.cs" Link="Grammar\DeclarationModifiers.cs" Condition="'$(TargetFramework)' != 'netstandard2.0'" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Syntax\SyntaxKind.cs" Link="Grammar\SyntaxKind.cs" Condition="'$(TargetFramework)' != 'netstandard2.0'" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Syntax\SyntaxKindFacts.cs" Link="Grammar\SyntaxKindFacts.cs" Condition="'$(TargetFramework)' != 'netstandard2.0'" /> | ||
|
||
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="$(SourceGeneratorMicrosoftCodeAnalysisVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" /> | ||
</ItemGroup> | ||
<Choose> | ||
<When Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="$(SourceGeneratorMicrosoftCodeAnalysisVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'"> | ||
<PackageReference Include="System.Collections.Immutable" Version="$(SourceBuildLiftedSystemCollectionsImmutableVersion)" PrivateAssets="all" /> | ||
<PackageReference Include="System.Reflection.Metadata" Version="$(SourceBuildLiftedSystemReflectionMetadataVersion)" PrivateAssets="all" /> | ||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SourceBuildLiftedSystemRuntimeCompilerServicesUnsafeVersion)" PrivateAssets="all" /> | ||
<PackageReference Include="System.Text.Encoding.CodePages" Version="$(SourceBuildLiftedSystemTextEncodingCodePagesVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❔ Why do these need to be explicit? Aren't they inherited from Microsoft.CodeAnalysis.Common? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The packages are inherited from Microsoft.CodeAnalysis.Common. However, roslyn builds before runtime in the source-build tarball, so we don't have access to the "current" versions of the packages to build against. The I have just realized that a better solution for this might be to add the packages to SBRP, so I will get working on that and hopefully this change won't be necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added the necessary packages to SBRP and verified that the changes to |
||
</When> | ||
<Otherwise> | ||
<ItemGroup> | ||
<!-- If we're building the command line tool, we have to include some dependencies used for grammar generation --> | ||
<Compile Include="..\..\..\..\..\Compilers\Core\Portable\Symbols\WellKnownMemberNames.cs" Link="Grammar\WellKnownMemberNames.cs" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Declarations\DeclarationModifiers.cs" Link="Grammar\DeclarationModifiers.cs" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Syntax\SyntaxKind.cs" Link="Grammar\SyntaxKind.cs" /> | ||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Syntax\SyntaxKindFacts.cs" Link="Grammar\SyntaxKindFacts.cs" /> | ||
</ItemGroup> | ||
</Otherwise> | ||
</Choose> | ||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Why is Tools.props being included in sourcebuild? Can we exclude the file through some other means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it is included by Arcade: https://github.com/dotnet/arcade/blob/aa647dcfc48bd3a644625e549ff71b7d06ed0958/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj#L53