Patch edits
This commit is contained in:
parent
57ab17c67a
commit
16d51bd2aa
1 changed files with 70 additions and 34 deletions
|
@ -3,27 +3,26 @@ From: Joey Robichaud <jorobich@microsoft.com>
|
|||
Date: Wed, 20 Oct 2021 13:40:38 -0700
|
||||
Subject: [PATCH] Add Features projects to SourceBuild
|
||||
|
||||
For additional details see https://github.com/dotnet/roslyn/issues/57270
|
||||
Patch created from: https://github.com/dotnet/roslyn/pull/57277
|
||||
---
|
||||
eng/SourceBuild.props | 2 +-
|
||||
eng/Versions.props | 13 ++++++++-----
|
||||
.../Core/Tests}/Directory.Build.props | 0
|
||||
.../Microsoft.Build.Tasks.CodeAnalysis.csproj | 6 +++---
|
||||
...rosoft.Build.Tasks.CodeAnalysis.UnitTests.csproj | 6 +++---
|
||||
.../Extension/Roslyn.Compilers.Extension.csproj | 6 +++---
|
||||
src/Dependencies/Directory.Build.props | 3 ---
|
||||
.../Microsoft.CodeAnalysis.CSharp.Features.csproj | 5 +++++
|
||||
.../Portable/Microsoft.CodeAnalysis.Features.csproj | 10 ++++++++--
|
||||
src/Features/LanguageServer/Directory.Build.props | 6 ++++++
|
||||
src/Features/Lsif/Directory.Build.props | 6 ++++++
|
||||
...crosoft.CodeAnalysis.VisualBasic.Features.vbproj | 4 ++++
|
||||
src/NuGet/VisualStudio/Directory.Build.props | 6 ++++++
|
||||
src/Tools/AnalyzerRunner/AnalyzerRunner.csproj | 2 +-
|
||||
.../IdeCoreBenchmarks/IdeCoreBenchmarks.csproj | 2 +-
|
||||
...Microsoft.CodeAnalysis.Workspaces.MSBuild.csproj | 8 +++-----
|
||||
...CodeAnalysis.Workspaces.MSBuild.UnitTests.csproj | 4 ++--
|
||||
17 files changed, 60 insertions(+), 29 deletions(-)
|
||||
eng/SourceBuild.props | 2 +-
|
||||
eng/Versions.props | 17 ++++++++++++-----
|
||||
.../Core/Tests}/Directory.Build.props | 0
|
||||
.../Microsoft.Build.Tasks.CodeAnalysis.csproj | 6 +++---
|
||||
...ft.Build.Tasks.CodeAnalysis.UnitTests.csproj | 6 +++---
|
||||
.../Extension/Roslyn.Compilers.Extension.csproj | 6 +++---
|
||||
...soft.CodeAnalysis.Collections.Package.csproj | 1 +
|
||||
...icrosoft.CodeAnalysis.CSharp.Features.csproj | 5 +++++
|
||||
.../Microsoft.CodeAnalysis.Features.csproj | 10 ++++++++--
|
||||
.../LanguageServer/Directory.Build.props | 6 ++++++
|
||||
src/Features/Lsif/Directory.Build.props | 6 ++++++
|
||||
...oft.CodeAnalysis.VisualBasic.Features.vbproj | 4 ++++
|
||||
src/NuGet/VisualStudio/Directory.Build.props | 6 ++++++
|
||||
src/Tools/AnalyzerRunner/AnalyzerRunner.csproj | 2 +-
|
||||
src/Tools/BuildBoss/ProjectCheckerUtil.cs | 7 ++++---
|
||||
.../IdeCoreBenchmarks/IdeCoreBenchmarks.csproj | 2 +-
|
||||
...osoft.CodeAnalysis.Workspaces.MSBuild.csproj | 8 +++-----
|
||||
...Analysis.Workspaces.MSBuild.UnitTests.csproj | 4 ++--
|
||||
18 files changed, 69 insertions(+), 29 deletions(-)
|
||||
rename src/{Features => CodeStyle/Core/Tests}/Directory.Build.props (100%)
|
||||
create mode 100644 src/Features/LanguageServer/Directory.Build.props
|
||||
create mode 100644 src/Features/Lsif/Directory.Build.props
|
||||
|
@ -43,7 +42,7 @@ index 182f8a9cdb1..92e316a4744 100644
|
|||
</Target>
|
||||
|
||||
diff --git a/eng/Versions.props b/eng/Versions.props
|
||||
index e835ef04d52..d432c9a6a96 100644
|
||||
index e835ef04d52..34cab5c4755 100644
|
||||
--- a/eng/Versions.props
|
||||
+++ b/eng/Versions.props
|
||||
@@ -38,7 +38,7 @@
|
||||
|
@ -55,7 +54,7 @@ index e835ef04d52..d432c9a6a96 100644
|
|||
<!-- The version of Roslyn we build Source Generators against that are built in this
|
||||
repository. This must be lower than MicrosoftNetCompilersToolsetVersion,
|
||||
but not higher than our minimum dogfoodable Visual Studio version, or else
|
||||
@@ -60,11 +60,14 @@
|
||||
@@ -60,11 +60,18 @@
|
||||
<FakeSignVersion>0.9.2</FakeSignVersion>
|
||||
<HumanizerCoreVersion>2.2.0</HumanizerCoreVersion>
|
||||
<ICSharpCodeDecompilerVersion>6.1.0.5902</ICSharpCodeDecompilerVersion>
|
||||
|
@ -65,7 +64,11 @@ index e835ef04d52..d432c9a6a96 100644
|
|||
- <MicrosoftBuildRuntimeVersion>$(MicrosoftBuildPackagesVersion)</MicrosoftBuildRuntimeVersion>
|
||||
- <MicrosoftBuildTasksCoreVersion>$(MicrosoftBuildPackagesVersion)</MicrosoftBuildTasksCoreVersion>
|
||||
+ <!--
|
||||
+ These are used as reference assemblies only, so they must have a "RefOnly" prefix to avoid assignment via PVP.
|
||||
+ 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>
|
||||
|
@ -136,17 +139,18 @@ index 3644afb8c2f..ed4259ec61b 100644
|
|||
<PackageReference Include="Microsoft.VisualStudio.SDK.Analyzers" Version="$(MicrosoftVisualStudioSDKAnalyzersVersion)" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingVersion)" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="$(MicrosoftVisualStudioValidationVersion)" />
|
||||
diff --git a/src/Dependencies/Directory.Build.props b/src/Dependencies/Directory.Build.props
|
||||
index 6eef643958f..12d9ad073ec 100644
|
||||
--- a/src/Dependencies/Directory.Build.props
|
||||
+++ b/src/Dependencies/Directory.Build.props
|
||||
@@ -1,6 +1,3 @@
|
||||
<Project>
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||
- <PropertyGroup>
|
||||
- <ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
- </PropertyGroup>
|
||||
</Project>
|
||||
diff --git a/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.Package.csproj b/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.Package.csproj
|
||||
index 22cab2f5f03..cfc79989175 100644
|
||||
--- a/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.Package.csproj
|
||||
+++ b/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.Package.csproj
|
||||
@@ -7,6 +7,7 @@
|
||||
<DebugType>none</DebugType>
|
||||
<GenerateDependencyFile>false</GenerateDependencyFile>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
+ <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
|
||||
|
||||
<!-- NuGet -->
|
||||
<IsPackable>true</IsPackable>
|
||||
diff --git a/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj b/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj
|
||||
index a82a820316c..9dac307c856 100644
|
||||
--- a/src/Features/CSharp/Portable/Microsoft.CodeAnalysis.CSharp.Features.csproj
|
||||
|
@ -255,6 +259,38 @@ index 6e1cbe46285..8ca3cbb28f0 100644
|
|||
<PackageReference Include="Microsoft.Build.Locator" Version="$(MicrosoftBuildLocatorVersion)" />
|
||||
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
|
||||
<PackageReference Include="System.ComponentModel.Composition" Version="$(SystemComponentModelCompositionVersion)" />
|
||||
diff --git a/src/Tools/BuildBoss/ProjectCheckerUtil.cs b/src/Tools/BuildBoss/ProjectCheckerUtil.cs
|
||||
index e571afede4a..0cb613b77a6 100644
|
||||
--- a/src/Tools/BuildBoss/ProjectCheckerUtil.cs
|
||||
+++ b/src/Tools/BuildBoss/ProjectCheckerUtil.cs
|
||||
@@ -157,6 +157,7 @@ private IEnumerable<string> GetAllowedPackageReferenceVersions(PackageReference
|
||||
var name = packageReference.Name.Replace(".", "").Replace("-", "");
|
||||
yield return $"$({name}Version)";
|
||||
yield return $"$({name}FixedVersion)";
|
||||
+ yield return $"$(RefOnly{name}Version)";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,8 +235,8 @@ private bool CheckProjectReferencesComplete(TextWriter textWriter, IEnumerable<P
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
- /// Unit test projects should not reference each other. In order for unit tests to be run / F5 they must be
|
||||
- /// modeled as deployment projects. Having Unit Tests reference each other hurts that because it ends up
|
||||
+ /// Unit test projects should not reference each other. In order for unit tests to be run / F5 they must be
|
||||
+ /// modeled as deployment projects. Having Unit Tests reference each other hurts that because it ends up
|
||||
/// putting two copies of the unit test DLL into the UnitTest folder:
|
||||
///
|
||||
/// 1. UnitTests\Current\TheUnitTest\TheUnitTest.dll
|
||||
@@ -244,7 +245,7 @@ private bool CheckProjectReferencesComplete(TextWriter textWriter, IEnumerable<P
|
||||
/// TheOtherTests.dll
|
||||
///
|
||||
/// This is problematic as all of our tools do directory based searches for unit test DLLs. Hence they end up
|
||||
- /// getting counted twice.
|
||||
+ /// getting counted twice.
|
||||
///
|
||||
/// Consideration was given to fixing up all of the tools but it felt like fighting against the grain. Pretty
|
||||
/// much every repo has this practice.
|
||||
diff --git a/src/Tools/IdeCoreBenchmarks/IdeCoreBenchmarks.csproj b/src/Tools/IdeCoreBenchmarks/IdeCoreBenchmarks.csproj
|
||||
index 305f94cba17..e2373f8a3d6 100644
|
||||
--- a/src/Tools/IdeCoreBenchmarks/IdeCoreBenchmarks.csproj
|
||||
|
|
Loading…
Reference in a new issue