From d3299344ba439ba065052365e1b3f7ef80d779b5 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 3 May 2023 22:36:44 +0200 Subject: [PATCH 01/27] Clean-up sourcelink repo and remove workarounds (grouped into commits) (#1015) * Remove non-needed sourcebuild target I verified that this is no longer needed. Sourcebuild automatically creates packages. * Enable FlagNetStandard1XDependencies arcade switch * Remove unnecessary MicrosoftNETTestSdkVersion entry * Remove unused NuGetPackagingVersion property in Versions.props * Group dependencies in Versions.props by source repo * Replace runtimeconfig.template.json with Rollfroward Delete runtimeconfig.template.json in favor of the in-built "..." switch. * Define target frameworks for source build centrally in one place. * Use NoTargets msbuild SDK for StandardCI.csproj Use the Microsoft.Build.NoTargets SDK for content-only packages. That avoids invoking the compiler without defining custom targets and makes the repository use the same path as other repositories in the stack. * Remove non-needed PrivateAssets attribute * Add 'Version' suffix to MicrosoftBuildTasksCoreVersion property * Remove non-needed ExcludeFromSourceBuild switch Projects that offer a .NETFramework TFM only are already automatically removed by arcade's TFM filtering that is enabled for source-build. * Remove non-needed TestUtilities dependencies * Add link to tracking issue for TFM filtering * Revert XUnit.Combinatorial change --- eng/SourceBuild.props | 7 ----- eng/Versions.props | 22 ++++++++----- eng/runtimeconfig.template.json | 3 -- global.json | 3 +- src/Directory.Build.props | 1 - src/Directory.Build.targets | 5 +++ .../Microsoft.Build.StandardCI.csproj | 31 +++++++------------ .../Microsoft.Build.Tasks.Git.csproj | 5 ++- .../Microsoft.Build.Tasks.Tfvc.csproj | 5 ++- ...ft.SourceLink.AzureDevOpsServer.Git.csproj | 3 +- ...Microsoft.SourceLink.AzureRepos.Git.csproj | 3 +- ...icrosoft.SourceLink.AzureRepos.Tfvc.csproj | 3 +- .../Microsoft.SourceLink.Bitbucket.Git.csproj | 3 +- .../Microsoft.SourceLink.Common.csproj | 5 ++- .../Microsoft.SourceLink.GitHub.csproj | 3 +- .../Microsoft.SourceLink.GitLab.csproj | 3 +- .../Microsoft.SourceLink.GitWeb.csproj | 3 +- .../Microsoft.SourceLink.Gitea.csproj | 3 +- .../Microsoft.SourceLink.Gitee.csproj | 3 +- ...icrosoft.SourceLink.Tools.UnitTests.csproj | 2 +- src/TestUtilities/TestUtilities.csproj | 9 +++--- .../dotnet-sourcelink.csproj | 2 ++ .../runtimeconfig.template.json | 3 -- 23 files changed, 54 insertions(+), 76 deletions(-) delete mode 100644 eng/runtimeconfig.template.json delete mode 100644 src/dotnet-sourcelink/runtimeconfig.template.json diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index a7291edf..303b8564 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -6,11 +6,4 @@ true - - - $(InnerBuildArgs) /p:Pack=true - - - diff --git a/eng/Versions.props b/eng/Versions.props index abadf0bb..994e10ad 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -5,19 +5,25 @@ beta true - 17.3.2 - 17.3.2 - - 17.5.0 - 19.210.0-preview - 5.7.0 - 5.7.0 + + true + + + 2.0.0-beta4.22272.1 2.0.0-beta4.22272.1 0.4.0-alpha.22272.1 + + 17.3.2 + 17.3.2 + + 5.7.0 + 7.0.2 - 1.5.25 + + 19.210.0-preview 0.27.0-preview-0119 + 1.5.25 diff --git a/eng/runtimeconfig.template.json b/eng/runtimeconfig.template.json deleted file mode 100644 index 384e2f49..00000000 --- a/eng/runtimeconfig.template.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rollForwardOnNoCandidateFx": 2 -} diff --git a/global.json b/global.json index 438d73ed..ebbcc94a 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,7 @@ "dotnet": "8.0.100-preview.3.23178.7" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23226.4" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23226.4", + "Microsoft.Build.NoTargets": "3.7.0" } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 29f040fd..0cce6c74 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,7 +6,6 @@ enable MIT true - $(RepositoryEngineeringDir)runtimeconfig.template.json true diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 0a156954..0d0686cc 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,6 +1,11 @@ + + + $(NetCurrent) + + diff --git a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj b/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj index cdb4bbe5..ac6685ac 100644 --- a/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj +++ b/src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj @@ -1,30 +1,21 @@ - - - net472;$(NetMinimum);$(NetCurrent) - true - true - true + - + + netstandard2.0 true - $(MSBuildProjectName).nuspec - $(OutputPath) - + true Standard CI targets. Standard CI msbuild targets true - false - false + + $(NoWarn);NU5128 + true - + - - - - - - - + \ No newline at end of file diff --git a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj index b992e0cd..2e0715a2 100644 --- a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj +++ b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -15,8 +14,8 @@ true - - + + diff --git a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj b/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj index e21d484e..3509bace 100644 --- a/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj +++ b/src/Microsoft.Build.Tasks.Tfvc/Microsoft.Build.Tasks.Tfvc.csproj @@ -2,7 +2,6 @@ net472 true - true true @@ -16,8 +15,8 @@ true - - + + diff --git a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj index 6c52cf35..6e643422 100644 --- a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj +++ b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -27,7 +26,7 @@ - + diff --git a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj index 4757f63e..e8ef360d 100644 --- a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj +++ b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -27,7 +26,7 @@ - + diff --git a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj b/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj index d9e43b66..5fdde5e1 100644 --- a/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj +++ b/src/SourceLink.AzureRepos.Tfvc/Microsoft.SourceLink.AzureRepos.Tfvc.csproj @@ -2,7 +2,6 @@ net472 true - true true @@ -19,6 +18,6 @@ - + diff --git a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj index 1bd9f98d..95b89fd1 100644 --- a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj +++ b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -26,7 +25,7 @@ - + diff --git a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj index 15ed185a..64ebcbd0 100644 --- a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj +++ b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -15,8 +14,8 @@ true - - + + diff --git a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj index 4c1da838..7130e1f7 100644 --- a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj +++ b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -26,7 +25,7 @@ - + diff --git a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj index cdca77dc..3e9373d5 100644 --- a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj +++ b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -26,7 +25,7 @@ - + diff --git a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj index a92fb8e5..c322f662 100644 --- a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj +++ b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -27,7 +26,7 @@ - + diff --git a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj index 83223a6d..8904abb2 100644 --- a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj +++ b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -26,7 +25,7 @@ - + diff --git a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj index 3943dd63..61d7dac9 100644 --- a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj +++ b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj @@ -1,7 +1,6 @@ net472;$(NetMinimum);$(NetCurrent) - $(NetCurrent) true @@ -26,7 +25,7 @@ - + diff --git a/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj b/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj index 6bdfc601..0550598c 100644 --- a/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj +++ b/src/SourceLink.Tools.UnitTests/Microsoft.SourceLink.Tools.UnitTests.csproj @@ -2,7 +2,7 @@ net472;$(NetCurrent) - + diff --git a/src/TestUtilities/TestUtilities.csproj b/src/TestUtilities/TestUtilities.csproj index 8034a7b3..2154ed09 100644 --- a/src/TestUtilities/TestUtilities.csproj +++ b/src/TestUtilities/TestUtilities.csproj @@ -7,14 +7,13 @@ - - - - + + + - + diff --git a/src/dotnet-sourcelink/dotnet-sourcelink.csproj b/src/dotnet-sourcelink/dotnet-sourcelink.csproj index 7d150b07..42f00bbb 100644 --- a/src/dotnet-sourcelink/dotnet-sourcelink.csproj +++ b/src/dotnet-sourcelink/dotnet-sourcelink.csproj @@ -2,6 +2,8 @@ Exe $(NetCurrent) + + Major true diff --git a/src/dotnet-sourcelink/runtimeconfig.template.json b/src/dotnet-sourcelink/runtimeconfig.template.json deleted file mode 100644 index 2c73f398..00000000 --- a/src/dotnet-sourcelink/runtimeconfig.template.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rollForwardOnNoCandidateFx": 2 -} \ No newline at end of file From 4eda9c2daa169a58f8b1ff673a51de90e0be8242 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 13:12:07 +0000 Subject: [PATCH 02/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230503.2 (#1020) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 772707e0..fd293440 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 469dcc0cbcba5221727c8a5b9eec4a478e24a780 - + https://github.com/dotnet/source-build-reference-packages - 2eb51fd1ec260129f623e0f01abd7752b56f5513 + c65b02aef21850de618d37a5304d3bbd829c2733 From 17a4a5a2888d8033be63d84ab9a0cd01750d06c8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 12:36:33 +0000 Subject: [PATCH 03/27] Update dependencies from https://github.com/dotnet/arcade build 20230505.2 (#1021) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 4 ++-- eng/common/cross/toolchain.cmake | 32 ++++++++++++++++++++++----- eng/common/native/init-compiler.sh | 2 +- eng/common/templates/job/job.yml | 2 +- eng/common/tools.ps1 | 28 ++++++++++++++++++++---- eng/common/tools.sh | 35 +++++++++++++++++++++++++++--- global.json | 2 +- 7 files changed, 88 insertions(+), 17 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fd293440..11306ead 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,9 +15,9 @@ - + https://github.com/dotnet/arcade - 469dcc0cbcba5221727c8a5b9eec4a478e24a780 + 5dff25b814b90abb85c847ed274cf4afb2c1b276 https://github.com/dotnet/source-build-reference-packages diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 1c9d212d..ce01673c 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -67,13 +67,25 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6") endif() elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") set(CMAKE_SYSTEM_PROCESSOR ppc64le) - set(TOOLCHAIN "powerpc64le-linux-gnu") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl) + set(TOOLCHAIN "powerpc64le-alpine-linux-musl") + else() + set(TOOLCHAIN "powerpc64le-linux-gnu") + endif() elseif(TARGET_ARCH_NAME STREQUAL "riscv64") set(CMAKE_SYSTEM_PROCESSOR riscv64) - set(TOOLCHAIN "riscv64-linux-gnu") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl) + set(TOOLCHAIN "riscv64-alpine-linux-musl") + else() + set(TOOLCHAIN "riscv64-linux-gnu") + endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") set(CMAKE_SYSTEM_PROCESSOR s390x) - set(TOOLCHAIN "s390x-linux-gnu") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl) + set(TOOLCHAIN "s390x-alpine-linux-musl") + else() + set(TOOLCHAIN "s390x-linux-gnu") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x64") set(CMAKE_SYSTEM_PROCESSOR x86_64) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl) @@ -92,7 +104,11 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) - set(TOOLCHAIN "i686-linux-gnu") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + set(TOOLCHAIN "i586-alpine-linux-musl") + else() + set(TOOLCHAIN "i686-linux-gnu") + endif() if(TIZEN) set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") endif() @@ -266,8 +282,11 @@ elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + add_toolchain_linker_flag("--target=${TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}") + endif() add_toolchain_linker_flag(-m32) - if(TIZEN) add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") @@ -307,6 +326,9 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") add_compile_options(-mfloat-abi=softfp) endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + add_compile_options(--target=${TOOLCHAIN}) + endif() add_compile_options(-m32) add_compile_options(-Wno-error=unused-command-line-argument) endif() diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 7aee4213..517401b6 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -64,7 +64,7 @@ if [ -z "$CLR_CC" ]; then if [ -z "$majorVersion" ]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" - elif [ "$compiler" = "gcc" ]; then versions="12 11 10 9 8 7 6 5 4.9"; fi + elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi for version in $versions; do _major="${version%%.*}" diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index a7bbf0f1..44ad26ab 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -158,7 +158,7 @@ jobs: - template: /eng/common/templates/steps/component-governance.yml parameters: ${{ if eq(parameters.disableComponentGovernance, '') }}: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: disableComponentGovernance: false ${{ else }}: disableComponentGovernance: true diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 8ad03be3..38cf94ff 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -287,6 +287,25 @@ function InstallDotNet([string] $dotnetRoot, [string] $runtimeSourceFeedKey = '', [switch] $noPath) { + $dotnetVersionLabel = "'sdk v$version'" + + if ($runtime -ne '' -and $runtime -ne 'sdk') { + $runtimePath = $dotnetRoot + $runtimePath = $runtimePath + "\shared" + if ($runtime -eq "dotnet") { $runtimePath = $runtimePath + "\Microsoft.NETCore.App" } + if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" } + if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" } + $runtimePath = $runtimePath + "\" + $version + + $dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'" + + if (Test-Path $runtimePath) { + Write-Host " Runtime toolset '$runtime/$architecture v$version' already installed." + $installSuccess = $true + Exit + } + } + $installScript = GetDotNetInstallScript $dotnetRoot $installParameters = @{ Version = $version @@ -323,18 +342,18 @@ function InstallDotNet([string] $dotnetRoot, } else { $location = "public location"; } - Write-Host "Attempting to install dotnet from $location." + Write-Host " Attempting to install $dotnetVersionLabel from $location." try { & $installScript @variation $installSuccess = $true break } catch { - Write-Host "Failed to install dotnet from $location." + Write-Host " Failed to install $dotnetVersionLabel from $location." } } if (-not $installSuccess) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 } } @@ -399,7 +418,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # Locate Visual Studio installation or download x-copy msbuild. $vsInfo = LocateVisualStudio $vsRequirements if ($vsInfo -ne $null) { - $vsInstallDir = $vsInfo.installationPath + # Ensure vsInstallDir has a trailing slash + $vsInstallDir = Join-Path $vsInfo.installationPath "\" $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion diff --git a/eng/common/tools.sh b/eng/common/tools.sh index cf9fb1ea..e8d47894 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -184,6 +184,35 @@ function InstallDotNetSdk { function InstallDotNet { local root=$1 local version=$2 + local runtime=$4 + + local dotnetVersionLabel="'$runtime v$version'" + if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then + runtimePath="$root" + runtimePath="$runtimePath/shared" + case "$runtime" in + dotnet) + runtimePath="$runtimePath/Microsoft.NETCore.App" + ;; + aspnetcore) + runtimePath="$runtimePath/Microsoft.AspNetCore.App" + ;; + windowsdesktop) + runtimePath="$runtimePath/Microsoft.WindowsDesktop.App" + ;; + *) + ;; + esac + runtimePath="$runtimePath/$version" + + dotnetVersionLabel="runtime toolset '$runtime/$architecture v$version'" + + if [ -d "$runtimePath" ]; then + echo " Runtime toolset '$runtime/$architecture v$version' already installed." + local installSuccess=1 + return + fi + fi GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript @@ -228,17 +257,17 @@ function InstallDotNet { for variationName in "${variations[@]}"; do local name="$variationName[@]" local variation=("${!name}") - echo "Attempting to install dotnet from $variationName." + echo " Attempting to install $dotnetVersionLabel from $variationName." bash "$install_script" "${variation[@]}" && installSuccess=1 if [[ "$installSuccess" -eq 1 ]]; then break fi - echo "Failed to install dotnet from $variationName." + echo " Failed to install $dotnetVersionLabel from $variationName." done if [[ "$installSuccess" -eq 0 ]]; then - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations." + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 fi } diff --git a/global.json b/global.json index ebbcc94a..5c003f18 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "8.0.100-preview.3.23178.7" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23226.4", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.2", "Microsoft.Build.NoTargets": "3.7.0" } } From 3f1eb077e4bc1c85c8e461b290938d8580da9c36 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 13:32:15 +0000 Subject: [PATCH 04/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230508.2 (#1022) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 11306ead..4de2cc6a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/source-build-reference-packages - c65b02aef21850de618d37a5304d3bbd829c2733 + c896aec98150aae68c90b0579a24babc864ceb88 From 4b54bfcb711f195d5050cce302a8e170a289e3f3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 10 May 2023 13:17:01 +0000 Subject: [PATCH 05/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230509.1 (#1023) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4de2cc6a..4b04b49e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/source-build-reference-packages - c896aec98150aae68c90b0579a24babc864ceb88 + 3e23b3bb8fb547e2431e80c6f510146d09aaae84 From 80b277d5798895c6cc0e72a2147bb88aa90367b1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 12 May 2023 13:19:58 +0000 Subject: [PATCH 06/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230511.1 (#1024) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4b04b49e..c1fb6db0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/source-build-reference-packages - 3e23b3bb8fb547e2431e80c6f510146d09aaae84 + 1661f3710daecbc59ae9e163b1b7eec6c5fb7db0 From 26f00d0d1b899365c530f4f6b87f77afb3f38017 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 13 May 2023 13:07:33 +0000 Subject: [PATCH 07/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230512.1 (#1025) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c1fb6db0..21a4a368 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 5dff25b814b90abb85c847ed274cf4afb2c1b276 - + https://github.com/dotnet/source-build-reference-packages - 1661f3710daecbc59ae9e163b1b7eec6c5fb7db0 + d76c30028584fb1d02d9b27dc48e65ad87f4ecfe From fabe882c67b290381d0995a73d4ca7d8614e1c4b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 12:40:56 +0000 Subject: [PATCH 08/27] Update dependencies from https://github.com/dotnet/arcade build 20230512.5 (#1026) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 4 +- eng/common/cross/build-rootfs.sh | 94 ++++++++++++------------ eng/common/cross/toolchain.cmake | 13 ++-- eng/common/cross/x64/sources.list.bionic | 11 +++ global.json | 2 +- 5 files changed, 67 insertions(+), 57 deletions(-) create mode 100644 eng/common/cross/x64/sources.list.bionic diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 21a4a368..66ac77b0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,9 +15,9 @@ - + https://github.com/dotnet/arcade - 5dff25b814b90abb85c847ed274cf4afb2c1b276 + 1aff4eb33aa7cbf26ccd9fc43c17cb609a14dad4 https://github.com/dotnet/source-build-reference-packages diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 6a59f753..9caf9b02 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -27,6 +27,7 @@ __AlpineArch=armv7 __FreeBSDArch=arm __FreeBSDMachineArch=armv7 __IllumosArch=arm7 +__HaikuArch=arm __QEMUArch=arm __UbuntuArch=armhf __UbuntuRepo="http://ports.ubuntu.com/" @@ -85,8 +86,12 @@ __IllumosPackages+=" mit-krb5" __IllumosPackages+=" openssl" __IllumosPackages+=" zlib" -__HaikuPackages="gmp" +__HaikuPackages="gcc_syslibs" +__HaikuPackages+=" gcc_syslibs_devel" +__HaikuPackages+=" gmp" __HaikuPackages+=" gmp_devel" +__HaikuPackages+=" icu66" +__HaikuPackages+=" icu66_devel" __HaikuPackages+=" krb5" __HaikuPackages+=" krb5_devel" __HaikuPackages+=" libiconv" @@ -95,6 +100,10 @@ __HaikuPackages+=" llvm12_libunwind" __HaikuPackages+=" llvm12_libunwind_devel" __HaikuPackages+=" mpfr" __HaikuPackages+=" mpfr_devel" +__HaikuPackages+=" openssl" +__HaikuPackages+=" openssl_devel" +__HaikuPackages+=" zlib" +__HaikuPackages+=" zlib_devel" # ML.NET dependencies __UbuntuPackages+=" libomp5" @@ -210,6 +219,7 @@ while :; do __FreeBSDArch=amd64 __FreeBSDMachineArch=amd64 __illumosArch=x86_64 + __HaikuArch=x86_64 __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" ;; x86) @@ -340,7 +350,6 @@ while :; do ;; haiku) __CodeName=haiku - __BuildArch=x64 __SkipUnmount=1 ;; --skipunmount) @@ -559,67 +568,54 @@ elif [[ "$__CodeName" == "illumos" ]]; then elif [[ "$__CodeName" == "haiku" ]]; then JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} - echo "Building Haiku sysroot for x86_64" + echo "Building Haiku sysroot for $__HaikuArch" mkdir -p "$__RootfsDir/tmp" - cd "$__RootfsDir/tmp" - git clone -b hrev56235 https://review.haiku-os.org/haiku - git clone -b btrev43195 https://review.haiku-os.org/buildtools - cd "$__RootfsDir/tmp/buildtools" && git checkout 7487388f5110021d400b9f3b88e1a7f310dc066d - - # Fetch some unmerged patches - cd "$__RootfsDir/tmp/haiku" - ## Add development build profile (slimmer than nightly) - git fetch origin refs/changes/64/4164/1 && git -c commit.gpgsign=false cherry-pick FETCH_HEAD - - # Build jam - cd "$__RootfsDir/tmp/buildtools/jam" - make - - # Configure cross tools - echo "Building cross-compiler" - mkdir -p "$__RootfsDir/generated" - cd "$__RootfsDir/generated" - "$__RootfsDir/tmp/haiku/configure" -j"$JOBS" --sysroot "$__RootfsDir" --cross-tools-source "$__RootfsDir/tmp/buildtools" --build-cross-tools x86_64 - - # Build Haiku packages - echo "Building Haiku" - echo 'HAIKU_BUILD_PROFILE = "development-raw" ;' > UserProfileConfig - "$__RootfsDir/tmp/buildtools/jam/jam0" -j"$JOBS" -q 'package' 'Haiku' - - BaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg" - - # Download additional packages - echo "Downloading additional required packages" + pushd "$__RootfsDir/tmp" + + mkdir "$__RootfsDir/tmp/download" + + echo "Downloading Haiku package tool" + git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 $__RootfsDir/tmp/script + wget -O "$__RootfsDir/tmp/download/hosttools.zip" $($__RootfsDir/tmp/script/fetch.sh --hosttools) + unzip -o "$__RootfsDir/tmp/download/hosttools.zip" -d "$__RootfsDir/tmp/bin" + + DepotBaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg" + HpkgBaseUrl="https://eu.hpkg.haiku-os.org/haiku/master/$__HaikuArch/current" + + # Download Haiku packages + echo "Downloading Haiku packages" read -ra array <<<"$__HaikuPackages" for package in "${array[@]}"; do echo "Downloading $package..." # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60 # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598 - hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_x86_64","versionType":"LATEST","naturalLanguageCode":"en"}' \ - --header='Content-Type:application/json' "$BaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" - wget -P "$__RootfsDir/generated/download" "$hpkgDownloadUrl" + hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \ + --header='Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" + wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl" + done + for package in haiku haiku_devel; do + echo "Downloading $package..." + hpkgVersion="$(wget -qO- $HpkgBaseUrl | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')" + wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg" done - # Setup the sysroot - echo "Setting up sysroot and extracting needed packages" + # Set up the sysroot + echo "Setting up sysroot and extracting required packages" mkdir -p "$__RootfsDir/boot/system" - for file in "$__RootfsDir/generated/objects/haiku/x86_64/packaging/packages/"*.hpkg; do - "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file" - done - for file in "$__RootfsDir/generated/download/"*.hpkg; do - "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file" + for file in "$__RootfsDir/tmp/download/"*.hpkg; do + echo "Extracting $file..." + LD_LIBRARY_PATH="$__RootfsDir/tmp/bin" "$__RootfsDir/tmp/bin/package" extract -C "$__RootfsDir/boot/system" "$file" done + # Download buildtools + echo "Downloading Haiku buildtools" + wget -O "$__RootfsDir/tmp/download/buildtools.zip" $($__RootfsDir/tmp/script/fetch.sh --buildtools --arch=$__HaikuArch) + unzip -o "$__RootfsDir/tmp/download/buildtools.zip" -d "$__RootfsDir" + # Cleaning up temporary files echo "Cleaning up temporary files" + popd rm -rf "$__RootfsDir/tmp" - for name in "$__RootfsDir/generated/"*; do - if [[ "$name" =~ "cross-tools-" ]]; then - : # Keep the cross-compiler - else - rm -rf "$name" - fi - done elif [[ -n "$__CodeName" ]]; then if [[ "$__SkipSigCheck" == "0" ]]; then diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index ce01673c..a88d643c 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -6,6 +6,7 @@ unset(FREEBSD) unset(ILLUMOS) unset(ANDROID) unset(TIZEN) +unset(HAIKU) set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) @@ -16,6 +17,7 @@ elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc) set(ILLUMOS 1) elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h) set(CMAKE_SYSTEM_NAME Haiku) + set(HAIKU 1) else() set(CMAKE_SYSTEM_NAME Linux) set(LINUX 1) @@ -76,7 +78,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") set(CMAKE_SYSTEM_PROCESSOR riscv64) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl) set(TOOLCHAIN "riscv64-alpine-linux-musl") - else() + else() set(TOOLCHAIN "riscv64-linux-gnu") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -100,7 +102,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(ILLUMOS) set(TOOLCHAIN "x86_64-illumos") elseif(HAIKU) - set(TOOLCHAIN "x64_64-unknown-haiku") + set(TOOLCHAIN "x86_64-unknown-haiku") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) @@ -214,10 +216,8 @@ elseif(HAIKU) return() endif() - set(SEARCH_PATH "${CROSS_ROOTFS}/generated/cross-tools-x86_64/bin") - find_program(EXEC_LOCATION_${exec} - PATHS ${SEARCH_PATH} + PATHS "${CROSS_ROOTFS}/cross-tools-x86_64/bin" NAMES "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" "${TOOLSET_PREFIX}${exec}") @@ -296,6 +296,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib") +elseif(HAIKU) + add_toolchain_linker_flag("-lnetwork") + add_toolchain_linker_flag("-lroot") endif() # Specify compile options diff --git a/eng/common/cross/x64/sources.list.bionic b/eng/common/cross/x64/sources.list.bionic new file mode 100644 index 00000000..a71ccadc --- /dev/null +++ b/eng/common/cross/x64/sources.list.bionic @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse diff --git a/global.json b/global.json index 5c003f18..05108cef 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "8.0.100-preview.3.23178.7" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23255.2", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23262.5", "Microsoft.Build.NoTargets": "3.7.0" } } From a97fab94590abac8014345bfaf68e8a7a362cd6a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 13:29:39 +0000 Subject: [PATCH 09/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230515.3 (#1027) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 66ac77b0..433a82e9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -19,9 +19,9 @@ https://github.com/dotnet/arcade 1aff4eb33aa7cbf26ccd9fc43c17cb609a14dad4 - + https://github.com/dotnet/source-build-reference-packages - d76c30028584fb1d02d9b27dc48e65ad87f4ecfe + e2e64d25662c00a35726d3c52f969a50edaa4f48 From d6c5a5004b117fbf43c6f00e7c67944cca513724 Mon Sep 17 00:00:00 2001 From: Oleksandr Didyk <106967057+oleksandr-didyk@users.noreply.github.com> Date: Tue, 16 May 2023 19:30:16 +0200 Subject: [PATCH 10/27] add source-build pre-built detection (#933) * add pre-build detection * downgrade MSBuild to 16.8 * add clarifying comments; move source-build RID prop in CI * fixup sbrp definition; fixup invalid msbuild version prop * update changes made * remove redundant CI arg * add missing sb attribute; bump arcade dep versions * remove obsolete pre-built exclusions; fixup dep versions * remove obsolete nuget source; fixup sourcebuild metadata * fixup duplicate dependency declaration * add explanation for dotnet-sourcelink exclusion --- NuGet.config | 2 ++ eng/SourceBuildPrebuiltBaseline.xml | 5 ++-- eng/Version.Details.xml | 24 +++++++++++++++---- .../dotnet-sourcelink.csproj | 2 ++ 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7ba2e9d2..d8bb4177 100644 --- a/NuGet.config +++ b/NuGet.config @@ -6,6 +6,8 @@ + + diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index c1b6dfbf..b820875a 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -1,5 +1,6 @@ + - + - + \ No newline at end of file diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 433a82e9..1cb322ef 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,16 +13,32 @@ https://github.com/dotnet/command-line-api 209b724a3c843253d3071e8348c353b297b0b8b5 + + https://github.com/dotnet/command-line-api + 209b724a3c843253d3071e8348c353b297b0b8b5 + + + + https://github.com/dotnet/source-build-reference-packages + e2e64d25662c00a35726d3c52f969a50edaa4f48 + + https://github.com/dotnet/arcade 1aff4eb33aa7cbf26ccd9fc43c17cb609a14dad4 + - - https://github.com/dotnet/source-build-reference-packages - e2e64d25662c00a35726d3c52f969a50edaa4f48 - + + https://github.com/dotnet/sourcelink + 759f344923a0859f3fae83431d0ba1cc62108118 + + + + https://github.com/dotnet/xliff-tasks + 519d565b45c46ac452fe5a77ab63295138992e07 + diff --git a/src/dotnet-sourcelink/dotnet-sourcelink.csproj b/src/dotnet-sourcelink/dotnet-sourcelink.csproj index 42f00bbb..6e0bd5f0 100644 --- a/src/dotnet-sourcelink/dotnet-sourcelink.csproj +++ b/src/dotnet-sourcelink/dotnet-sourcelink.csproj @@ -4,6 +4,8 @@ $(NetCurrent) Major + + true true From 68cb2a99257709416c9bf952718d459f66e49c57 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 13:01:43 +0000 Subject: [PATCH 11/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230516.4 (#1029) [main] Update dependencies from dotnet/source-build-reference-packages - Coherency Updates: - Microsoft.SourceLink.GitHub: from 8.0.0-beta.23218.3 to 8.0.0-beta.23218.3 (parent: Microsoft.DotNet.Arcade.Sdk) - Microsoft.DotNet.XliffTasks: from 1.0.0-beta.23261.1 to 1.0.0-beta.23261.1 (parent: Microsoft.DotNet.Arcade.Sdk) --- eng/Version.Details.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1cb322ef..fa709e3e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - e2e64d25662c00a35726d3c52f969a50edaa4f48 + fd98754b692a1a8da2aaadd28ce3952578d9d9ad @@ -32,12 +32,12 @@ https://github.com/dotnet/sourcelink - 759f344923a0859f3fae83431d0ba1cc62108118 + 47c52dd2ebf9edfd40abdcff999c13eb461f6ce2 https://github.com/dotnet/xliff-tasks - 519d565b45c46ac452fe5a77ab63295138992e07 + a0391b3beff0696561189b5881f8af3b651d64ac From 705c54799fed7339a7f416cc3fd635e71eb8fa95 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 20 May 2023 13:08:33 +0000 Subject: [PATCH 12/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230519.1 (#1030) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fa709e3e..0101843f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - fd98754b692a1a8da2aaadd28ce3952578d9d9ad + ee8aa57dda469f3fa25131bab56484ad2a216181 From 1dd2d26168a0b0555febdbc9e89ce608105a918e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 13:00:05 +0000 Subject: [PATCH 13/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230523.1 (#1033) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0101843f..77623a94 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - ee8aa57dda469f3fa25131bab56484ad2a216181 + 43c337012443bb42d4baf97b4232dd04b443b5ef From 3c82ddc1c0648f8e19b2f9a53c82a7e7752bc99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Tue, 23 May 2023 15:39:45 -0700 Subject: [PATCH 14/27] Allow multiple Source Link assemblies to be loaded from different locations (#1034) --- .../RepositoryTask.cs | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs b/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs index ef838b5d..eb19f467 100644 --- a/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs +++ b/src/Microsoft.Build.Tasks.Git/RepositoryTask.cs @@ -13,9 +13,6 @@ namespace Microsoft.Build.Tasks.Git { public abstract class RepositoryTask : Task { - // Include the assembly version in the key to avoid conflicts with other SourceLink versions. - private static readonly string s_cacheKeyPrefix = $"3AE29AB7-AE6B-48BA-9851-98A15ED51C94:{typeof(RepositoryTask).Assembly.GetName().Version}:"; - /// /// Sets the scope of git repository configuration. By default (no scope specified) configuration is read from environment variables /// and system and global user git/ssh configuration files. @@ -142,21 +139,12 @@ private void ExecuteImpl() return repository; } - private string GetCacheKey(string repositoryId) - => s_cacheKeyPrefix + (string.IsNullOrEmpty(ConfigurationScope) ? "*" : ConfigurationScope) + ":" + repositoryId; + private Tuple GetCacheKey(string repositoryId) + => new(typeof(RepositoryTask), (string.IsNullOrEmpty(ConfigurationScope) ? "*" : ConfigurationScope) + ":" + repositoryId); - private bool TryGetCachedRepositoryInstance(string cacheKey, bool requireCached, [NotNullWhen(true)]out GitRepository? repository) + private bool TryGetCachedRepositoryInstance(Tuple cacheKey, bool requireCached, [NotNullWhen(true)]out GitRepository? repository) { - StrongBox? entry; - try - { - entry = (StrongBox?)BuildEngine4.GetRegisteredTaskObject(cacheKey, RegisteredTaskObjectLifetime.Build); - } - catch (InvalidCastException) // workaround for https://github.com/dotnet/msbuild/issues/8478 - { - entry = null; - } - + var entry = (StrongBox?)BuildEngine4.GetRegisteredTaskObject(cacheKey, RegisteredTaskObjectLifetime.Build); if (entry != null) { Log.LogMessage(MessageImportance.Low, $"SourceLink: Reusing cached git repository information."); @@ -164,16 +152,21 @@ private bool TryGetCachedRepositoryInstance(string cacheKey, bool requireCached, return repository != null; } + var message = $"SourceLink: Repository instance not found in cache: '{cacheKey.Item2}'"; if (requireCached) { - Log.LogError($"SourceLink: Repository instance not found in cache: '{cacheKey.Substring(s_cacheKeyPrefix.Length)}'"); + Log.LogError(message); + } + else + { + Log.LogMessage(MessageImportance.Low, message); } repository = null; return false; } - private void CacheRepositoryInstance(string cacheKey, GitRepository? repository) + private void CacheRepositoryInstance(Tuple cacheKey, GitRepository? repository) { BuildEngine4.RegisterTaskObject( cacheKey, From 404f7ac82fe1fca303c4a66261a91d38b29493b0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 12:54:30 +0000 Subject: [PATCH 15/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230523.2 (#1035) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 77623a94..df58139e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 43c337012443bb42d4baf97b4232dd04b443b5ef + ccf417a0ac5eb10eae069f9a75a836fcd46af453 From c0a1cee63564ca4e5780543f974f5c8e3d1bf459 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 13:08:51 +0000 Subject: [PATCH 16/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230524.2 (#1036) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index df58139e..fafe8cbd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - ccf417a0ac5eb10eae069f9a75a836fcd46af453 + db0cbe78748b71b00df05aff15cac2c8ce870cfd From e61a464178fb401fb18f716a86c6fc881af4f288 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 30 May 2023 13:02:16 +0000 Subject: [PATCH 17/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230529.2 (#1037) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fafe8cbd..158e2916 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - db0cbe78748b71b00df05aff15cac2c8ce870cfd + 1c8ee93e7a8cc4d32e3ac1306c2d7956c3f9f1c1 From d8b0c349630340a2f81fece6113aaaa06d6d9d23 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 13:19:02 +0000 Subject: [PATCH 18/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230531.1 (#1039) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 158e2916..0c0cc92d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 1c8ee93e7a8cc4d32e3ac1306c2d7956c3f9f1c1 + 5bc298ffcdf49cea125e418972930d4cd524452d From efb6946cb0eabff0981d31b1d5268a09ecd96a01 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 2 Jun 2023 12:57:30 +0000 Subject: [PATCH 19/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230601.1 (#1040) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0c0cc92d..35d1123e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 5bc298ffcdf49cea125e418972930d4cd524452d + e19d5e6d3d294d9d9360aa0c5a40dc7658439b63 From be870c3f6799768bcc2e2580771bfd69d294c257 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 3 Jun 2023 13:09:23 +0000 Subject: [PATCH 20/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230602.3 (#1041) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 35d1123e..fe3a5cfe 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - e19d5e6d3d294d9d9360aa0c5a40dc7658439b63 + 4a3b4b6b37bdafe501477bf2e564380e1962ce61 From 35c1276c489edc04b1dac541ca0483814cdd759d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 13:16:32 +0000 Subject: [PATCH 21/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230605.3 (#1042) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fe3a5cfe..4f1c9649 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 4a3b4b6b37bdafe501477bf2e564380e1962ce61 + 658250387023abc09df27acf7d67ed1a07421dca From 54845957d006b690f1d07ad9790473039f09a326 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 13:12:34 +0000 Subject: [PATCH 22/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230606.1 (#1043) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4f1c9649..f06b3147 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 658250387023abc09df27acf7d67ed1a07421dca + 9eb08132867fce9671597e3ca6f89a345547ee4f From 1a6634659b6b435055a410ca31c22c2bd78bbe8a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 9 Jun 2023 13:09:36 +0000 Subject: [PATCH 23/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230609.1 (#1045) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f06b3147..0d806f2b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - 9eb08132867fce9671597e3ca6f89a345547ee4f + b0f656e394f8e98f48f11612ac997750bb85ff6c From 23bda65700e70b6697390dcc4e0f87e2dfbce63a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 9 Jun 2023 19:30:54 +0200 Subject: [PATCH 24/27] Fix packaging of Microsoft.Build.StandardCI (#1046) When performing an official build, DebugType is portable which causes the IncludeSymbols flag in src/Directory.Build.props to evaluate to true. The Microsoft.Build.StandardCI project uses the Microsoft.Build.NoTargets SDK which doesn't produce a build output (as the package only ships a content file and not a binary). Change the condition to check if the NoTargets SDK is used which indicates that a symbol shouldn't be included. --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 0cce6c74..f0c49560 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,7 +8,7 @@ true - true + true snupkg From d4a66fc3b601b856e6384743174d4998c19cb725 Mon Sep 17 00:00:00 2001 From: Oleksandr Didyk <106967057+oleksandr-didyk@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:52:22 +0200 Subject: [PATCH 25/27] add review comment to sb files (#1038) --- eng/SourceBuild.props | 2 ++ eng/SourceBuildPrebuiltBaseline.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 303b8564..a5089a00 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -1,3 +1,5 @@ + + diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index b820875a..2a571b3e 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -1,4 +1,6 @@ + + From bbb1a3cd4488e5d91baedf0a89c50927084efa22 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 12:38:20 +0000 Subject: [PATCH 26/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230612.2 (#1048) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0d806f2b..56770aac 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - b0f656e394f8e98f48f11612ac997750bb85ff6c + ceb1133c46abe15ee48ea799950e7a6a74417b74 From 4d2c8bf58e8cb7900ec2d9077c155572e2d3cd88 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:57:03 +0000 Subject: [PATCH 27/27] Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230614.1 (#1049) [main] Update dependencies from dotnet/source-build-reference-packages --- eng/Version.Details.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 56770aac..3d6b24aa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -18,9 +18,9 @@ 209b724a3c843253d3071e8348c353b297b0b8b5 - + https://github.com/dotnet/source-build-reference-packages - ceb1133c46abe15ee48ea799950e7a6a74417b74 + f8ebadcc83f7fc8cfd5147078c87d6e583cb32f1