Skip to content

Commit 3cb13be

Browse files
[main] Update dependencies from dotnet/arcade (#404)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.XliffTasks From Version 9.0.0-beta.24266.1 -> To Version 9.0.0-beta.24272.5 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 95602ba commit 3cb13be

File tree

8 files changed

+117
-43
lines changed

8 files changed

+117
-43
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
</Dependency>
1010
</ProductDependencies>
1111
<ToolsetDependencies>
12-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24266.1">
12+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24272.5">
1313
<Uri>https://github.com/dotnet/arcade</Uri>
14-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
14+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24266.1">
16+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24272.5">
1717
<Uri>https://github.com/dotnet/arcade</Uri>
18-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
18+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
1919
</Dependency>
2020
<!-- Intermediate is necessary for source build. -->
21-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24266.1">
21+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24272.5">
2222
<Uri>https://github.com/dotnet/arcade</Uri>
23-
<Sha>ed14da5934ffb536cff8f41f8b5719334524cbed</Sha>
23+
<Sha>2001d73c8ff942331a73300ba61fa6164805b231</Sha>
2424
<SourceBuild RepoName="arcade" ManagedOnly="true" />
2525
</Dependency>
2626
</ToolsetDependencies>

eng/common/core-templates/job/source-index-stage1.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
runAsPublic: false
3-
sourceIndexUploadPackageVersion: 2.0.0-20240502.12
4-
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240129.2
3+
sourceIndexUploadPackageVersion: 2.0.0-20240522.1
4+
sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1
55
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
66
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
77
preSteps: []
@@ -88,4 +88,4 @@ jobs:
8888
displayName: "Login to Azure"
8989
9090
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
91-
displayName: Upload stage1 artifacts to source index
91+
displayName: Upload stage1 artifacts to source index
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
22
<Project>
33

4+
<PropertyGroup>
5+
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
6+
<ImportDirectoryPackagesProps>false</ImportDirectoryPackagesProps>
7+
</PropertyGroup>
8+
49
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
510

611
</Project>

eng/common/internal/Tools.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
<PropertyGroup>
55
<TargetFramework>net472</TargetFramework>
6-
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
76
<AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages>
87
</PropertyGroup>
98
<ItemGroup>

eng/common/native/init-compiler.sh

+55-30
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#
33
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
44
#
5-
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
5+
# NOTE: some scripts source this file and rely on stdout being empty, make sure
6+
# to not output *anything* here, unless it is an error message that fails the
7+
# build.
68

79
if [ -z "$build_arch" ] || [ -z "$compiler" ]; then
810
echo "Usage..."
@@ -58,6 +60,26 @@ check_version_exists() {
5860
echo "$desired_version"
5961
}
6062

63+
__baseOS="$(uname)"
64+
set_compiler_version_from_CC() {
65+
if [ "$__baseOS" = "Darwin" ]; then
66+
# On Darwin, the versions from -version/-dumpversion refer to Xcode
67+
# versions, not llvm versions, so we can't rely on them.
68+
return
69+
fi
70+
71+
version="$("$CC" -dumpversion)"
72+
if [ -z "$version" ]; then
73+
echo "Error: $CC -dumpversion didn't provide a version"
74+
exit 1
75+
fi
76+
77+
# gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments.
78+
IFS=. read -r majorVersion minorVersion _ <<EOF
79+
$version
80+
EOF
81+
}
82+
6183
if [ -z "$CLR_CC" ]; then
6284

6385
# Set default versions
@@ -74,64 +96,67 @@ if [ -z "$CLR_CC" ]; then
7496
done
7597

7698
if [ -z "$majorVersion" ]; then
77-
if command -v "$compiler" > /dev/null; then
78-
if [ "$(uname)" != "Darwin" ]; then
79-
echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH."
80-
fi
81-
CC="$(command -v "$compiler")"
82-
CXX="$(command -v "$cxxCompiler")"
83-
else
84-
echo "No usable version of $compiler found."
99+
if ! command -v "$compiler" > /dev/null; then
100+
echo "Error: No usable version of $compiler found."
85101
exit 1
86102
fi
103+
104+
CC="$(command -v "$compiler" 2> /dev/null)"
105+
CXX="$(command -v "$cxxCompiler" 2> /dev/null)"
106+
set_compiler_version_from_CC
87107
else
88-
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
89-
if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
90-
if command -v "$compiler" > /dev/null; then
91-
echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
92-
CC="$(command -v "$compiler")"
93-
CXX="$(command -v "$cxxCompiler")"
94-
else
95-
echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
96-
exit 1
97-
fi
108+
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ] && { [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; }; then
109+
# If a major version was provided explicitly, and it was too old, find a newer compiler instead
110+
if ! command -v "$compiler" > /dev/null; then
111+
echo "Error: Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
112+
exit 1
98113
fi
114+
115+
CC="$(command -v "$compiler" 2> /dev/null)"
116+
CXX="$(command -v "$cxxCompiler" 2> /dev/null)"
117+
set_compiler_version_from_CC
99118
fi
100119
fi
101120
else
102121
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
103122
if [ "$desired_version" = "-1" ]; then
104-
echo "Could not find specific version of $compiler: $majorVersion $minorVersion."
123+
echo "Error: Could not find specific version of $compiler: $majorVersion $minorVersion."
105124
exit 1
106125
fi
107126
fi
108127

109128
if [ -z "$CC" ]; then
110-
CC="$(command -v "$compiler$desired_version")"
111-
CXX="$(command -v "$cxxCompiler$desired_version")"
112-
if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler")"; fi
129+
CC="$(command -v "$compiler$desired_version" 2> /dev/null)"
130+
CXX="$(command -v "$cxxCompiler$desired_version" 2> /dev/null)"
131+
if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler" 2> /dev/null)"; fi
132+
set_compiler_version_from_CC
113133
fi
114134
else
115135
if [ ! -f "$CLR_CC" ]; then
116-
echo "CLR_CC is set but path '$CLR_CC' does not exist"
136+
echo "Error: CLR_CC is set but path '$CLR_CC' does not exist"
117137
exit 1
118138
fi
119139
CC="$CLR_CC"
120140
CXX="$CLR_CXX"
141+
set_compiler_version_from_CC
121142
fi
122143

123144
if [ -z "$CC" ]; then
124-
echo "Unable to find $compiler."
145+
echo "Error: Unable to find $compiler."
125146
exit 1
126147
fi
127148

128-
# Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.
129-
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && ([ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]); then
130-
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
131-
LDFLAGS="-fuse-ld=lld"
149+
if [ "$__baseOS" != "Darwin" ]; then
150+
# On Darwin, we always want to use the Apple linker.
151+
152+
# Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0.
153+
if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && { [ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]; }; then
154+
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
155+
LDFLAGS="-fuse-ld=lld"
156+
fi
132157
fi
133158
fi
134159

135-
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
160+
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)"
136161

137162
export CC CXX LDFLAGS SCAN_BUILD_COMMAND
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
parameters:
2+
- name: federatedServiceConnection
3+
type: string
4+
- name: outputVariableName
5+
type: string
6+
- name: expiryInHours
7+
type: number
8+
default: 1
9+
- name: base64Encode
10+
type: boolean
11+
default: false
12+
- name: storageAccount
13+
type: string
14+
- name: container
15+
type: string
16+
- name: permissions
17+
type: string
18+
default: 'rl'
19+
20+
steps:
21+
- task: AzureCLI@2
22+
displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}'
23+
inputs:
24+
azureSubscription: ${{ parameters.federatedServiceConnection }}
25+
scriptType: 'pscore'
26+
scriptLocation: 'inlineScript'
27+
inlineScript: |
28+
# Calculate the expiration of the SAS token and convert to UTC
29+
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
30+
31+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
32+
33+
if ($LASTEXITCODE -ne 0) {
34+
Write-Error "Failed to generate SAS token."
35+
exit 1
36+
}
37+
38+
if ('${{ parameters.base64Encode }}' -eq 'true') {
39+
$sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas))
40+
}
41+
42+
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
43+
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas"

eng/common/tools.ps1

+4-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ function Retry($downloadBlock, $maxRetries = 5) {
254254
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to download file in $maxRetries attempts."
255255
break
256256
}
257-
258257
}
259258
}
260259

@@ -424,7 +423,6 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
424423

425424
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
426425
} else {
427-
428426
if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
429427
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
430428
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
@@ -504,6 +502,10 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
504502
Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath
505503
})
506504

505+
if (!(Test-Path $packagePath)) {
506+
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "See https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/1074/Updating-Microsoft.DotNet.Arcade.MSBuild.Xcopy-WAS-RoslynTools.MSBuild-(xcopy-msbuild)-generation?anchor=troubleshooting for help troubleshooting issues with XCopy MSBuild"
507+
throw
508+
}
507509
Unzip $packagePath $packageDir
508510
}
509511

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"msbuild-sdks": {
21-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24266.1",
21+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24272.5",
2222
"MSTest.Sdk": "3.3.1"
2323
}
2424
}

0 commit comments

Comments
 (0)