Skip to content

Commit 0e0a1cf

Browse files
Update dependencies from build 303525 (#7180)
[release/7.0.x] Source code updates from dotnet/dotnet
1 parent e0613a1 commit 0e0a1cf

9 files changed

Lines changed: 78 additions & 41 deletions

File tree

eng/Version.Details.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This file should be imported by eng/Versions.props
2121
<!-- dotnet/corefx dependencies -->
2222
<SystemComponentModelCompositionPackageVersion>4.5.0</SystemComponentModelCompositionPackageVersion>
2323
<!-- dotnet/dotnet dependencies -->
24-
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26122.102</MicrosoftDotNetArcadeSdkPackageVersion>
25-
<MicrosoftDotNetXliffTasksPackageVersion>10.0.0-beta.26122.102</MicrosoftDotNetXliffTasksPackageVersion>
24+
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26125.128</MicrosoftDotNetArcadeSdkPackageVersion>
25+
<MicrosoftDotNetXliffTasksPackageVersion>10.0.0-beta.26125.128</MicrosoftDotNetXliffTasksPackageVersion>
2626
</PropertyGroup>
2727
<!--Property group for alternate package version names-->
2828
<PropertyGroup>

eng/Version.Details.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="nuget-client" Sha="e3f0655801bae4b7f1b7b5ceb3a1a60eb748e115" BarId="302854" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="nuget-client" Sha="f37535073ddded8cecd2e824cce25fbef9e39514" BarId="303525" />
44
<!--
55
Currently this file is required to publish builds to .NET build asset registry.
66
See https://github.com/dotnet/arcade/issues/2396 for details.
@@ -56,13 +56,13 @@
5656
</Dependency>
5757
</ProductDependencies>
5858
<ToolsetDependencies>
59-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26122.102">
59+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26125.128">
6060
<Uri>https://github.com/dotnet/dotnet</Uri>
61-
<Sha>e3f0655801bae4b7f1b7b5ceb3a1a60eb748e115</Sha>
61+
<Sha>f37535073ddded8cecd2e824cce25fbef9e39514</Sha>
6262
</Dependency>
63-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.26122.102">
63+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="10.0.0-beta.26125.128">
6464
<Uri>https://github.com/dotnet/dotnet</Uri>
65-
<Sha>e3f0655801bae4b7f1b7b5ceb3a1a60eb748e115</Sha>
65+
<Sha>f37535073ddded8cecd2e824cce25fbef9e39514</Sha>
6666
</Dependency>
6767
</ToolsetDependencies>
6868
</Dependencies>

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
}

eng/common/vmr-sync.sh

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ fi
186186

187187
# Synchronize the VMR
188188

189+
version_details_path=$(cd "$scriptroot/.."; pwd -P)/Version.Details.xml
190+
repo_name=$(grep -m 1 '<Source ' "$version_details_path" | sed -n 's/.*Mapping="\([^"]*\)".*/\1/p')
191+
if [[ -z "$repo_name" ]]; then
192+
fail "Failed to resolve repo mapping from $version_details_path"
193+
exit 1
194+
fi
195+
189196
export DOTNET_ROOT="$dotnetDir"
190197

191198
"$darc_tool" vmr forwardflow \
@@ -199,9 +206,22 @@ export DOTNET_ROOT="$dotnetDir"
199206
if [[ $? == 0 ]]; then
200207
highlight "Synchronization succeeded"
201208
else
202-
fail "Synchronization of repo to VMR failed!"
203-
fail "'$vmr_dir' is left in its last state (re-run of this script will reset it)."
204-
fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)."
205-
fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
206-
exit 1
209+
highlight "Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents..."
210+
git -C "$vmr_dir" reset --hard
211+
212+
"$darc_tool" vmr reset \
213+
"$repo_name:HEAD" \
214+
--vmr "$vmr_dir" \
215+
--tmp "$tmp_dir" \
216+
--additional-remotes "$repo_name:$repo_root"
217+
218+
if [[ $? == 0 ]]; then
219+
highlight "Successfully reset the VMR using 'darc vmr reset'"
220+
else
221+
fail "Synchronization of repo to VMR failed!"
222+
fail "'$vmr_dir' is left in its last state (re-run of this script will reset it)."
223+
fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)."
224+
fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script."
225+
exit 1
226+
fi
207227
fi

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"pinned": true
1010
},
1111
"msbuild-sdks": {
12-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26122.102",
12+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26125.128",
1313
"Microsoft.Build.NoTargets": "3.7.0"
1414
}
1515
}

0 commit comments

Comments
 (0)