Merge branch 'release/6.0.2xx' into main

This commit is contained in:
Jason Zhai 2021-11-18 19:11:54 -08:00
commit 464d8128d7
5 changed files with 12 additions and 179 deletions

View file

@ -9,10 +9,10 @@
Basically: In this file, choose the highest version when resolving merge conflicts.
-->
<PropertyGroup>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.21</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.21</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.21</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.21</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.21</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.22</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.22</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.22</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.22</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.22</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
</PropertyGroup>
</Project>

View file

@ -51,7 +51,7 @@ index b1990aa..f6ddbbd 100644
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.2</MicrosoftCodeAnalysisAnalyzersVersion>
+ <MicrosoftExtensionsDependencyInjectionVersion>5.0.0</MicrosoftExtensionsDependencyInjectionVersion>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNETCoreCompilersPackageVersion>4.0.0-6.21526.21</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftNETCoreCompilersPackageVersion>4.0.0-6.21515.3</MicrosoftNETCoreCompilersPackageVersion>
<!-- Dependencies from https://github.com/dotnet/command-line-api -->
diff --git a/src/Logging/SimpleConsoleLogger.cs b/src/Logging/SimpleConsoleLogger.cs
index c361f84..fd8015c 100644

View file

@ -1,167 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Tue, 19 Oct 2021 16:11:51 -0500
Subject: [PATCH] Disable apphost on downlevel frameworks during source-build
During source-build, disable apphost build for 'fsi' and 'fsc', and
'fsyacc', 'fslex', and 'AssemblyCheck' during the bootstrap build.
Creating an apphost for a net5.0 project while building with a net6.0
SDK downloads the apphost pack as a prebuilt. Stopping the projects from
creating the apphost removes the prebuilt for source-build.
To make disabling the apphost work in the bootstrapping build, add a
check to eng/build.sh to skip the bootstrap build if we're currently
running the "outer" source-build. That gives source-build the ability to
run bootstrapping on its own terms. Now, when eng/SourceBuild.props runs
bootstrapping, it can pass the DotNetBuildFromSource property through
the environment so it takes effect.
See: https://github.com/dotnet/fsharp/issues/12282
PR: https://github.com/dotnet/fsharp/pull/12286
---
eng/SourceBuild.props | 2 +-
eng/build.sh | 51 ++++++++++---------
.../AssemblyCheck/AssemblyCheck.fsproj | 1 +
src/buildtools/fslex/fslex.fsproj | 1 +
src/buildtools/fsyacc/fsyacc.fsproj | 1 +
src/fsharp/fsc/fsc.fsproj | 1 +
src/fsharp/fsi/fsi.fsproj | 1 +
7 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index 22c929f28..903ee00d3 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -41,7 +41,7 @@
<Exec
Command="./build.sh --bootstrap --skipBuild"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
- EnvironmentVariables="@(InnerBuildEnv)" />
+ EnvironmentVariables="@(InnerBuildEnv);DotNetBuildFromSource=true" />
</Target>
</Project>
diff --git a/eng/build.sh b/eng/build.sh
index 9a2aa0083..6af422237 100755
--- a/eng/build.sh
+++ b/eng/build.sh
@@ -240,29 +240,34 @@ function BuildSolution {
node_reuse=false
# build bootstrap tools
- bootstrap_config=Proto
- bootstrap_dir=$artifacts_dir/Bootstrap
- if [[ "$force_bootstrap" == true ]]; then
- rm -fr $bootstrap_dir
- fi
- if [ ! -f "$bootstrap_dir/fslex.dll" ]; then
- BuildMessage="Error building tools"
- MSBuild "$repo_root/src/buildtools/buildtools.proj" \
- /restore \
- /p:Configuration=$bootstrap_config
-
- mkdir -p "$bootstrap_dir"
- cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net5.0 $bootstrap_dir/fslex
- cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net5.0 $bootstrap_dir/fsyacc
- fi
- if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
- BuildMessage="Error building bootstrap"
- MSBuild "$repo_root/proto.proj" \
- /restore \
- /p:Configuration=$bootstrap_config \
-
-
- cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net5.0 $bootstrap_dir/fsc
+ # source_build=true means we are currently in the outer/wrapper source-build,
+ # and building bootstrap needs to wait. The source-build targets will run this
+ # script again without setting source_build=true when it is done setting up
+ # the build environment. See 'eng/SourceBuild.props'.
+ if [[ "$source_build" != true ]]; then
+ bootstrap_config=Proto
+ bootstrap_dir=$artifacts_dir/Bootstrap
+ if [[ "$force_bootstrap" == true ]]; then
+ rm -fr $bootstrap_dir
+ fi
+ if [ ! -f "$bootstrap_dir/fslex.dll" ]; then
+ BuildMessage="Error building tools"
+ MSBuild "$repo_root/src/buildtools/buildtools.proj" \
+ /restore \
+ /p:Configuration=$bootstrap_config
+
+ mkdir -p "$bootstrap_dir"
+ cp -pr $artifacts_dir/bin/fslex/$bootstrap_config/net5.0 $bootstrap_dir/fslex
+ cp -pr $artifacts_dir/bin/fsyacc/$bootstrap_config/net5.0 $bootstrap_dir/fsyacc
+ fi
+ if [ ! -f "$bootstrap_dir/fsc.exe" ]; then
+ BuildMessage="Error building bootstrap"
+ MSBuild "$repo_root/proto.proj" \
+ /restore \
+ /p:Configuration=$bootstrap_config
+
+ cp -pr $artifacts_dir/bin/fsc/$bootstrap_config/net5.0 $bootstrap_dir/fsc
+ fi
fi
if [[ "$skip_build" != true ]]; then
diff --git a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
index 464b6ef78..5c78bbe6d 100644
--- a/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
+++ b/src/buildtools/AssemblyCheck/AssemblyCheck.fsproj
@@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/buildtools/fslex/fslex.fsproj b/src/buildtools/fslex/fslex.fsproj
index 1959ce59c..3d63bf6bf 100644
--- a/src/buildtools/fslex/fslex.fsproj
+++ b/src/buildtools/fslex/fslex.fsproj
@@ -5,6 +5,7 @@
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/buildtools/fsyacc/fsyacc.fsproj b/src/buildtools/fsyacc/fsyacc.fsproj
index 5d1b7141f..63b63c5de 100644
--- a/src/buildtools/fsyacc/fsyacc.fsproj
+++ b/src/buildtools/fsyacc/fsyacc.fsproj
@@ -5,6 +5,7 @@
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstants)</DefineConstants>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<ItemGroup>
diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj
index 7fa31fc21..04025c297 100644
--- a/src/fsharp/fsc/fsc.fsproj
+++ b/src/fsharp/fsc/fsc.fsproj
@@ -12,6 +12,7 @@
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<NGenBinary>true</NGenBinary>
<UseAppHost>true</UseAppHost>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj
index 9fd9b1333..eace6c166 100644
--- a/src/fsharp/fsi/fsi.fsproj
+++ b/src/fsharp/fsi/fsi.fsproj
@@ -13,6 +13,7 @@
<Win32Resource>fsi.res</Win32Resource>
<NGenBinary>true</NGenBinary>
<UseAppHost>true</UseAppHost>
+ <UseAppHost Condition="'$(DotNetBuildFromSource)' == 'true'">false</UseAppHost>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">

View file

@ -16,11 +16,11 @@ Background Issue: https://github.com/dotnet/source-build/issues/2542
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/eng/Packages.props b/eng/Packages.props
index 2de607c5d..1668addc9 100644
index 494c9c0..7689042 100644
--- a/eng/Packages.props
+++ b/eng/Packages.props
@@ -46,9 +46,6 @@
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
- </ItemGroup>
@ -34,9 +34,9 @@ index d08e337c5..3b173aee5 100644
--- a/src/Build/Microsoft.Build.csproj
+++ b/src/Build/Microsoft.Build.csproj
@@ -38,8 +38,10 @@
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
</ItemGroup>
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />

View file

@ -69,7 +69,7 @@ index c11557248..0e7dd7861 100644
<!-- Test and package versions -->
@@ -33,7 +34,7 @@
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.2" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" />
<PackageReference Update="Microsoft.DataAI.NuGetRecommender.Contracts" Version="2.1.0" />
- <PackageReference Update="Microsoft.Extensions.CommandLineUtils" Version="1.0.1" />