Merge release/6.0.1xx into release/6.0.2xx

This commit is contained in:
Daniel Plaisted 2021-11-11 12:36:42 -08:00
commit 9e40d10b11
8 changed files with 95 additions and 125 deletions

View file

@ -53,5 +53,7 @@ dockerbuild()
if [ ! -z "$BUILD_IN_DOCKER" ]; then
dockerbuild $args
else
sudo $DIR/run-build.sh $args
# Run under sudo so we can set ulimit
# See https://github.com/dotnet/core-eng/issues/14808
sudo -E $DIR/run-build.sh $args
fi

View file

@ -26,6 +26,7 @@ CUSTOM_BUILD_ARGS=
[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
# Set max number of files open, helps avoid errors during NuGet restore
# See https://github.com/dotnet/core-eng/issues/14808
ulimit -n 16384
args=( )

View file

@ -27,13 +27,9 @@ jobs:
Fedora33-Online:
_runOnline: true
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
# TODO: Don't run offline in Pr validation until prebuilts are stabilized/removed, otherwise dependency flow continuously breaks PR validation.
# https://github.com/dotnet/source-build/issues/2490
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
Fedora33-Offline:
_runOnline: false
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
Fedora33-Offline:
_runOnline: false
_Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
timeoutInMinutes: 210
variables:
_TarballDir: $(Build.StagingDirectory)/tarball
@ -85,10 +81,9 @@ jobs:
docker run --rm -v $(_TarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} -- /p:CleanWhileBuilding=true
displayName: Build Tarball
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/'
artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
displayName: Publish Source Build Artifacts
- publish: '$(_TarballDir)/artifacts/$(_BuildArch)/$(_BuildConfig)/'
artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
displayName: Publish Source Build Artifacts
- script: |
set -x

View file

@ -170,7 +170,7 @@
Condition="$(IsRootRepo) != 'true'" />
<Exec
Command="git submodule update --init --recursive"
Command="git submodule update --init --recursive --depth 1"
WorkingDirectory="$(TarballRepoSourceDir)" />
<!-- Remove the git objects folder to free up tarball space -->

View file

@ -602,6 +602,56 @@ function runXmlDocTests() {
fi
}
function runOmniSharpTests() {
dotnetCmd=${dotnetDir}/dotnet
rm -rf workdir
mkdir workdir
pushd workdir
curl -sSLO "https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-linux-x64.tar.gz"
mkdir omnisharp
pushd omnisharp
tar xf "../omnisharp-linux-x64.tar.gz"
popd
# 'blazorwasm' requires prereqs (non-source-built packages) - re-enable with https://github.com/dotnet/source-build/issues/2550
for project in blazorserver classlib console mstest mvc nunit web webapp webapi worker xunit ; do
mkdir hello-$project
pushd hello-$project
"${dotnetCmd}" new $project
popd
./omnisharp/run -s "$(readlink -f hello-$project)" > omnisharp.log &
sleep 5
pkill -P $$
# Omnisharp spawns off a number of processes. They all include the
# current directory as a process argument, so use that to identify and
# kill them.
pgrep -f "$(pwd)"
kill "$(pgrep -f "$(pwd)")"
cat omnisharp.log
if grep ERROR omnisharp.log; then
echo "test failed"
exit 1
else
echo "OK"
fi
done
popd
}
function resetCaches() {
rm -rf "$testingHome"
mkdir "$testingHome"
@ -684,10 +734,7 @@ echo SDK under test is:
export NUGET_PACKAGES="$restoredPackagesDir"
SOURCE_BUILT_PKGS_PATH="$SCRIPT_ROOT/artifacts/obj/$buildArch/$configuration/blob-feed/packages/"
export DOTNET_ROOT="$dotnetDir"
# OSX also requires DOTNET_ROOT to be on the PATH
if [ "$(uname)" == 'Darwin' ]; then
export PATH="$dotnetDir:$PATH"
fi
export PATH="$dotnetDir:$PATH"
# Run all tests, local restore sources first, online restore sources second
if [ "$excludeLocalTests" == "false" ]; then
@ -728,4 +775,6 @@ fi
runXmlDocTests
runOmniSharpTests
echo "ALL TESTS PASSED!"

View file

@ -1,106 +0,0 @@
From 827f1e036db2082b56b003f870f5ff8dabc9b1ed Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Tue, 12 Oct 2021 14:04:27 -0500
Subject: [PATCH] Fix Omnisharp: Add needed extra TFMs.
Omnisharp requires the net46 TFMs of this files explictly and we don't build them by default. This patch adds net46 to the relevant projects. The original issue for this was https://github.com/OmniSharp/omnisharp-vscode/issues/4610 and the long-term fix of switching to net>4 TFM is tracked in https://github.com/OmniSharp/omnisharp-vscode/issues/4360.
---
src/libraries/Directory.Build.props | 2 +-
.../ref/System.Resources.Extensions.csproj | 4 ++--
.../src/System.Resources.Extensions.csproj | 2 +-
.../ref/System.Runtime.CompilerServices.Unsafe.csproj | 4 ++--
.../src/System.Runtime.CompilerServices.Unsafe.ilproj | 6 +++++-
5 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index a03b334346a..30418e38a2a 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -20,7 +20,7 @@
<ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
<GeneratePlatformNotSupportedAssemblyHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GeneratePlatformNotSupportedAssemblyHeaderFile>
<!-- Build all .NET Framework configurations when net48 is passed in. This is for convenience. -->
- <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
+ <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net46;net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
</PropertyGroup>
<Import Sdk="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Project="Sdk.props" Condition="'$(UseTargetFrameworkSDK)' != 'false'" />
diff --git a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
index 99037ae459c..848be41690c 100644
--- a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
+++ b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net46;net461</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
@@ -11,4 +11,4 @@
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Resources.Writer\ref\System.Resources.Writer.csproj" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
index a0a79e45adf..29c9b123ce5 100644
--- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
+++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net46;net461</TargetFrameworks>
<DefineConstants>$(DefineConstants);RESOURCES_EXTENSIONS</DefineConstants>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
diff --git a/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime.CompilerServices.Unsafe.csproj b/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime.CompilerServices.Unsafe.csproj
index 766ea9a8ae7..5324c85404b 100644
--- a/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime.CompilerServices.Unsafe.csproj
+++ b/src/libraries/System.Runtime.CompilerServices.Unsafe/ref/System.Runtime.CompilerServices.Unsafe.csproj
@@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.1;netstandard2.1;netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.1;netstandard2.1;netstandard2.0;net46;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.CompilerServices.Unsafe.cs" />
@@ -14,4 +14,4 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<Reference Include="System.Runtime" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj b/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj
index a9e3de0c454..75467734292 100644
--- a/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj
+++ b/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net461</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.1;netstandard2.0;net46;net461</TargetFrameworks>
<!-- Make sure that the DebuggableAttribute is set properly. -->
<DebugOptimization>IMPL</DebugOptimization>
<DebugOptimization Condition="'$(Configuration)' == 'Release'">OPT</DebugOptimization>
@@ -20,6 +20,10 @@ System.Runtime.CompilerServices.Unsafe</PackageDescription>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<CoreAssembly>netstandard</CoreAssembly>
</PropertyGroup>
+ <PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
+ <CoreAssembly>mscorlib</CoreAssembly>
+ <ExtraMacros>#define $(TargetFramework)</ExtraMacros>
+ </PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<CoreAssembly>mscorlib</CoreAssembly>
<ExtraMacros>#define $(TargetFramework)</ExtraMacros>
--
2.18.0

View file

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Davis Goodin <dagood@microsoft.com>
Date: Tue, 26 Oct 2021 15:41:57 -0500
Subject: [PATCH] Enable source-link in source-build for '.version' file
See https://github.com/dotnet/source-build/issues/2569
---
eng/SourceBuild.props | 8 --------
1 file changed, 8 deletions(-)
diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props
index bba40f534e5..b70f668a15b 100644
--- a/eng/SourceBuild.props
+++ b/eng/SourceBuild.props
@@ -23,14 +23,6 @@
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
</PropertyGroup>
- <ItemGroup>
- <!-- Work around issue where local clone may cause failure using non-origin remote fallback: https://github.com/dotnet/sourcelink/issues/629 -->
- <InnerBuildEnv Include="EnableSourceControlManagerQueries=false" />
- <InnerBuildEnv Include="EnableSourceLink=false" />
- <InnerBuildEnv Include="DisableSourceLink=true" />
- <InnerBuildEnv Include="DeterministicSourcePaths=false" />
- </ItemGroup>
-
<Target Name="GetRuntimeSourceBuildCommandConfiguration"
BeforeTargets="GetSourceBuildCommandConfiguration">
<PropertyGroup>

View file

@ -26,8 +26,8 @@
<PropertyGroup>
<VersionFeature21>30</VersionFeature21>
<VersionFeature31>21</VersionFeature31>
<VersionFeature50>12</VersionFeature50>
<VersionFeature31>$([MSBuild]::Add($(VersionFeature), 21))</VersionFeature31>
<VersionFeature50>$([MSBuild]::Add($(VersionFeature), 12))</VersionFeature50>
</PropertyGroup>
<Target Name="GenerateBundledVersionsProps" DependsOnTargets="SetupBundledComponents">