Skip to content

Commit 2de3165

Browse files
[release/10.0.3xx] Source code updates from dotnet/dotnet (#53510)
[release/10.0.3xx] Source code updates from dotnet/dotnet - Handle null tostring for tests. - Remove reference to deleted enc config file - Update template engine error text expectations to match new output from sys.cl due to PR dotnet/command-line-api#2747 - Fix FakeItEasy interception of LicenseExpression string interpolation
1 parent 700802d commit 2de3165

26 files changed

Lines changed: 618 additions & 534 deletions

File tree

eng/Signing.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
<ItemGroup>
8787
<!-- Roslyn apphosts -->
8888
<FileSignInfo Condition="'$(TargetOS)' == 'osx'" Include="csc;vbc;VBCSCompiler" CertificateName="MacDeveloperHarden" />
89+
<!-- MSBuild apphost -->
90+
<FileSignInfo Condition="'$(TargetOS)' == 'osx'" Include="MSBuild" CertificateName="MacDeveloperHarden" />
8991
</ItemGroup>
9092

9193
<!-- Filter out any test packages from ItemsToSign -->

eng/Version.Details.props

Lines changed: 195 additions & 194 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 274 additions & 270 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<VersionMajor>10</VersionMajor>
88
<VersionMinor>0</VersionMinor>
99
<VersionSDKMinor>3</VersionSDKMinor>
10-
<VersionFeature>00</VersionFeature>
10+
<VersionSDKMinorPatch>0</VersionSDKMinorPatch>
11+
<VersionFeature>$([System.String]::Copy('$(VersionSDKMinorPatch)').PadLeft(2, '0'))</VersionFeature>
1112
<!-- This property powers the SdkAnalysisLevel property in end-user MSBuild code.
1213
It should always be the hundreds-value of the current SDK version, never any
1314
preview version components or anything else. E.g. 8.0.100, 9.0.300, etc. -->
@@ -20,7 +21,7 @@
2021
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
2122
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
2223
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
23-
<PreReleaseVersionIteration></PreReleaseVersionIteration>
24+
<PreReleaseVersionIteration>0</PreReleaseVersionIteration>
2425
<!-- In source-build the version of the compiler must be same or newer than the version of the
2526
compiler API targeted by analyzer assemblies. This is mostly an issue on source-build as
2627
in that build mode analyzer assemblies always target the live compiler API. -->

eng/common/core-templates/steps/publish-logs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ steps:
3131
-runtimeSourceFeed https://ci.dot.net/internal
3232
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'
3333
'$(publishing-dnceng-devdiv-code-r-build-re)'
34-
'$(MaestroAccessToken)'
3534
'$(dn-bot-all-orgs-artifact-feeds-rw)'
3635
'$(akams-client-id)'
3736
'$(microsoft-symbol-server-pat)'

eng/common/templates/steps/vmr-sync.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,6 @@ steps:
3838
displayName: Label PR commit
3939
workingDirectory: $(Agent.BuildDirectory)/repo
4040

41-
- script: |
42-
vmr_sha=$(grep -oP '(?<=Sha=")[^"]*' $(Agent.BuildDirectory)/repo/eng/Version.Details.xml)
43-
echo "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
44-
displayName: Obtain the vmr sha from Version.Details.xml (Unix)
45-
condition: ne(variables['Agent.OS'], 'Windows_NT')
46-
workingDirectory: $(Agent.BuildDirectory)/repo
47-
48-
- powershell: |
49-
[xml]$xml = Get-Content -Path $(Agent.BuildDirectory)/repo/eng/Version.Details.xml
50-
$vmr_sha = $xml.SelectSingleNode("//Source").Sha
51-
Write-Output "##vso[task.setvariable variable=vmr_sha]$vmr_sha"
52-
displayName: Obtain the vmr sha from Version.Details.xml (Windows)
53-
condition: eq(variables['Agent.OS'], 'Windows_NT')
54-
workingDirectory: $(Agent.BuildDirectory)/repo
55-
56-
- script: |
57-
git fetch --all
58-
git checkout $(vmr_sha)
59-
displayName: Checkout VMR at correct sha for repo flow
60-
workingDirectory: ${{ parameters.vmrPath }}
61-
6241
- script: |
6342
git config --global user.name "dotnet-maestro[bot]"
6443
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"

eng/common/templates/vmr-build-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ resources:
3434
type: github
3535
name: dotnet/dotnet
3636
endpoint: dotnet
37+
ref: refs/heads/main # Set to whatever VMR branch the PR build should insert into
3738

3839
stages:
3940
- template: /eng/pipelines/templates/stages/vmr-build.yml@vmr

eng/common/tools.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,11 @@ function MSBuild-Core() {
824824

825825
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
826826

827+
# Add -mt flag for MSBuild multithreaded mode if enabled via environment variable
828+
if ($env:MSBUILD_MT_ENABLED -eq "1") {
829+
$cmdArgs += ' -mt'
830+
}
831+
827832
if ($warnAsError) {
828833
$cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
829834
}

eng/common/tools.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,13 @@ function MSBuild-Core {
526526
}
527527
}
528528

529-
RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
529+
# Add -mt flag for MSBuild multithreaded mode if enabled via environment variable
530+
local mt_switch=""
531+
if [[ "${MSBUILD_MT_ENABLED:-}" == "1" ]]; then
532+
mt_switch="-mt"
533+
fi
534+
535+
RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
530536
}
531537

532538
function GetDarc {

eng/common/vmr-sync.ps1

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,20 @@ Set-StrictMode -Version Latest
103103
Highlight 'Installing .NET, preparing the tooling..'
104104
. .\eng\common\tools.ps1
105105
$dotnetRoot = InitializeDotNetCli -install:$true
106+
$env:DOTNET_ROOT = $dotnetRoot
106107
$darc = Get-Darc
107-
$dotnet = "$dotnetRoot\dotnet.exe"
108108

109109
Highlight "Starting the synchronization of VMR.."
110110

111111
# Synchronize the VMR
112+
$versionDetailsPath = Resolve-Path (Join-Path $PSScriptRoot '..\Version.Details.xml') | Select-Object -ExpandProperty Path
113+
[xml]$versionDetails = Get-Content -Path $versionDetailsPath
114+
$repoName = $versionDetails.SelectSingleNode('//Source').Mapping
115+
if (-not $repoName) {
116+
Fail "Failed to resolve repo mapping from $versionDetailsPath"
117+
exit 1
118+
}
119+
112120
$darcArgs = (
113121
"vmr", "forwardflow",
114122
"--tmp", $tmpDir,
@@ -130,9 +138,27 @@ if ($LASTEXITCODE -eq 0) {
130138
Highlight "Synchronization succeeded"
131139
}
132140
else {
133-
Fail "Synchronization of repo to VMR failed!"
134-
Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)."
135-
Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)."
136-
Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
137-
exit 1
141+
Highlight "Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents..."
142+
git -C $vmrDir reset --hard
143+
144+
$resetArgs = (
145+
"vmr", "reset",
146+
"${repoName}:HEAD",
147+
"--vmr", $vmrDir,
148+
"--tmp", $tmpDir,
149+
"--additional-remotes", "${repoName}:${repoRoot}"
150+
)
151+
152+
& "$darc" $resetArgs
153+
154+
if ($LASTEXITCODE -eq 0) {
155+
Highlight "Successfully reset the VMR using 'darc vmr reset'"
156+
}
157+
else {
158+
Fail "Synchronization of repo to VMR failed!"
159+
Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)."
160+
Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)."
161+
Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
162+
exit 1
163+
}
138164
}

0 commit comments

Comments
 (0)