From 822c8be0618090e7d9f836c38f0fe79485433858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Mon, 22 Aug 2022 13:22:22 +0200 Subject: [PATCH 01/22] Bump .NET version for XHarness workloads to preview 7 (#10497) --- .../Sdk/tools/xharness-runner/XHarnessRunner.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets index ab0881c9018..d601eb43954 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets +++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets @@ -2,7 +2,7 @@ true net7.0 - 7.0.100-preview.5.22307.18 + 7.0.100-preview.7.22377.5 6.0.202 sdk From d02d16272452408c2d2b86ae8e536aefae7af840 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 11:25:04 +0000 Subject: [PATCH 02/22] [main] Update dependencies from dotnet/xharness dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink (#10510) [main] Update dependencies from dotnet/xharness dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink --- eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 14 +++++++------- global.json | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 73cdea4ed1e..c0a3ce1cbb7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,25 +15,25 @@ - + https://github.com/dotnet/arcade - 21a53708b4645c64259b3883dac7709ddfa19fe8 + 34dff939b4a91e4693f78a856e0e055c1a3f3fba - + https://github.com/dotnet/arcade - 21a53708b4645c64259b3883dac7709ddfa19fe8 + 34dff939b4a91e4693f78a856e0e055c1a3f3fba - + https://github.com/dotnet/arcade - 21a53708b4645c64259b3883dac7709ddfa19fe8 + 34dff939b4a91e4693f78a856e0e055c1a3f3fba - + https://github.com/dotnet/arcade - 21a53708b4645c64259b3883dac7709ddfa19fe8 + 34dff939b4a91e4693f78a856e0e055c1a3f3fba - + https://github.com/dotnet/arcade - 21a53708b4645c64259b3883dac7709ddfa19fe8 + 34dff939b4a91e4693f78a856e0e055c1a3f3fba https://github.com/dotnet/arcade-services @@ -43,9 +43,9 @@ https://github.com/dotnet/arcade-services a5f3ed9d5f560555ff6d26b286acdcfbb7ce3b14 - + https://github.com/dotnet/xharness - 5ebf69650b9f7b4ecab485be840b3022420f7812 + 8e340b270ca0c7f7fa8e6e86519d47fb85408e87 https://github.com/dotnet/roslyn @@ -55,14 +55,14 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink - a74d21bcfa0f928b0cb1dab9fa6ff8a17248c584 + 1f5bb488caa266108e052d980df5e2626d2d80fb - + https://github.com/dotnet/sourcelink - a74d21bcfa0f928b0cb1dab9fa6ff8a17248c584 + 1f5bb488caa266108e052d980df5e2626d2d80fb https://github.com/dotnet/symreader-converter @@ -72,9 +72,9 @@ https://github.com/dotnet/symreader-converter c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0 - + https://github.com/dotnet/xliff-tasks - a125e2b00ca0add2a2a23e0ba67f8ae6a4b1a1ee + d106fdda2b3eda55f12e72977de336ab3afa1d91 diff --git a/eng/Versions.props b/eng/Versions.props index 394c25efdc2..0d9701dbf28 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -71,20 +71,20 @@ 8.5.0 2.4.2-pre.9 2.0.3 - 7.0.0-beta.22417.2 - 7.0.0-beta.22417.2 + 7.0.0-beta.22419.1 + 7.0.0-beta.22419.1 2.0.0 1.6.0 1.0.0 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22418-01 - 1.2.0-beta-22418-01 - 7.0.0-beta.22417.2 - 1.0.0-beta.22418.2 + 1.2.0-beta-22420-01 + 1.2.0-beta-22420-01 + 7.0.0-beta.22419.1 + 1.0.0-beta.22420.1 1.1.0-beta.22076.4 - 1.0.0-prerelease.22411.1 + 1.0.0-prerelease.22415.1 2.0.0-preview.1.21526.15 2.0.0-preview.1.21526.15 7.0.100-preview.5.22273.2 diff --git a/global.json b/global.json index 0ccc91b138b..72370f36d53 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "7.0.100-preview.7.22377.5" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22417.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22417.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22419.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22419.1" } } From 23171f368bdc0890ee1bd373a7bed58305035900 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:17:31 +0000 Subject: [PATCH 03/22] Update dependencies from https://github.com/dotnet/roslyn build 20220815.1 (#10529) [main] Update dependencies from dotnet/roslyn --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c0a3ce1cbb7..421613765d1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -47,9 +47,9 @@ https://github.com/dotnet/xharness 8e340b270ca0c7f7fa8e6e86519d47fb85408e87 - + https://github.com/dotnet/roslyn - c97184bafab9a34d61e85f1c1ef34f25283ce9ba + 8301d4840fa1a3e822c2cb17fdf7056fa6b41583 https://github.com/dotnet/linker diff --git a/eng/Versions.props b/eng/Versions.props index 0d9701dbf28..0ac0dbedf62 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -39,7 +39,7 @@ 2.0.0 2.1.1 2.1.0 - 4.3.0-3.22412.4 + 4.3.0-3.22415.1 17.4.0-preview-20220707-01 6.0.100-1.22103.2 1.0.0-v3.14.0.5722 From 19de74602675189517ea688b67a3979e891e41f2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 16:17:50 +0000 Subject: [PATCH 04/22] Update dependencies from https://github.com/dotnet/sourcelink build 20220821.1 (#10527) [main] Update dependencies from dotnet/sourcelink --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 421613765d1..58d2c0d8f77 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,12 +55,12 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink 1f5bb488caa266108e052d980df5e2626d2d80fb - + https://github.com/dotnet/sourcelink 1f5bb488caa266108e052d980df5e2626d2d80fb diff --git a/eng/Versions.props b/eng/Versions.props index 0ac0dbedf62..fa9d100f9db 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -79,8 +79,8 @@ 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22420-01 - 1.2.0-beta-22420-01 + 1.2.0-beta-22421-01 + 1.2.0-beta-22421-01 7.0.0-beta.22419.1 1.0.0-beta.22420.1 1.1.0-beta.22076.4 From f8733e09864f14e5f2652b1339c0408f97f6b659 Mon Sep 17 00:00:00 2001 From: Jon Fortescue Date: Mon, 22 Aug 2022 09:43:00 -0700 Subject: [PATCH 05/22] Check for LocExclusions with input path (correct!) (#10532) --- eng/common/generate-locproject.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index 846e7950ce9..bab18543d6c 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -62,7 +62,7 @@ $locJson = @{ $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($outputPath.Contains($exclusion)) + if ($_.FullName.Contains($exclusion)) { $continue = $false } @@ -98,7 +98,7 @@ $locJson = @{ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($outputPath.Contains($exclusion)) + if ($_.FullName.Contains($exclusion)) { $continue = $false } From 42e20d2fbe650beb584745f64ff8ef647c83f7e5 Mon Sep 17 00:00:00 2001 From: dotnet bot Date: Mon, 22 Aug 2022 11:23:28 -0700 Subject: [PATCH 06/22] Add scorecards for 2022-08-17 (#10519) --- .../Scorecard_2022-08-17.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/TeamProcess/Rollout-Scorecards/Scorecard_2022-08-17.md diff --git a/Documentation/TeamProcess/Rollout-Scorecards/Scorecard_2022-08-17.md b/Documentation/TeamProcess/Rollout-Scorecards/Scorecard_2022-08-17.md new file mode 100644 index 00000000000..363363f9d84 --- /dev/null +++ b/Documentation/TeamProcess/Rollout-Scorecards/Scorecard_2022-08-17.md @@ -0,0 +1,75 @@ +# 17 August 2022 Rollout Summaries + +## dotnet-helix-machines + +| Metric | Value | Target | Score | +|:--------------------------------:|:--------:|:--------:|:---------:| +| Time to Rollout | 04:10:02 | 06:00:00 | 0 | +| Critical/blocking issues created | 0 | 0 | 0 | +| Hotfixes | 0 | 0 | 0 | +| Rollbacks | 0 | 0 | 0 | +| Service downtime | 00:00:00 | 00:00:00 | 0 | +| Failed to rollout | FALSE | FALSE | 0 | +| Total | | | **0** | + + +## dotnet-helix-service + +| Metric | Value | Target | Score | +|:--------------------------------:|:--------:|:--------:|:---------:| +| Time to Rollout | 01:56:37 | 06:00:00 | 0 | +| Critical/blocking issues created | 0 | 0 | 0 | +| Hotfixes | 0 | 0 | 0 | +| Rollbacks | 0 | 0 | 0 | +| Service downtime | 00:00:00 | 00:00:00 | 0 | +| Failed to rollout | FALSE | FALSE | 0 | +| Total | | | **0** | + + +## arcade-services + +| Metric | Value | Target | Score | +|:--------------------------------:|:--------:|:--------:|:---------:| +| Time to Rollout | 02:08:32 | 06:00:00 | 0 | +| Critical/blocking issues created | 0 | 0 | 0 | +| Hotfixes | 0 | 0 | 0 | +| Rollbacks | 0 | 0 | 0 | +| Service downtime | 00:00:00 | 00:00:00 | 0 | +| Failed to rollout | FALSE | FALSE | 0 | +| Total | | | **0** | + + +# Itemized Scorecard + +## dotnet-helix-machines + +| Metric | [20220817.01](https://dev.azure.com/dnceng/7ea9116e-9fac-403d-b258-b31fcf1bb293/_build/results?buildId=1948642) | +|:-----:|:-----:| +| Time to Rollout | 04:10:02 | +| Critical/blocking issues created | 0 | +| Hotfixes | 0 | +| Rollbacks | 0 | +| Service downtime | 00:00:00 | + + +## dotnet-helix-service + +| Metric | [2022081705](https://dev.azure.com/dnceng/7ea9116e-9fac-403d-b258-b31fcf1bb293/_build/results?buildId=1949498) | +|:-----:|:-----:| +| Time to Rollout | 01:56:37 | +| Critical/blocking issues created | 0 | +| Hotfixes | 0 | +| Rollbacks | 0 | +| Service downtime | 00:00:00 | + + +## arcade-services + +| Metric | [20220817.1](https://dev.azure.com/dnceng/7ea9116e-9fac-403d-b258-b31fcf1bb293/_build/results?buildId=1949514) | +|:-----:|:-----:| +| Time to Rollout | 02:08:32 | +| Critical/blocking issues created | 0 | +| Hotfixes | 0 | +| Rollbacks | 0 | +| Service downtime | 00:00:00 | + From 3fd7922054e920d6289194eec58435badc7c4385 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 22 Aug 2022 11:54:00 -0700 Subject: [PATCH 07/22] Update Xunit to 2.4.2 (#10512) --- Documentation/AzureDevOps/SendingJobsToHelix.md | 4 ++-- eng/Versions.props | 2 +- src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props | 2 +- src/Microsoft.DotNet.Helix/Sdk/Readme.md | 2 +- .../Sdk/tools/xunit-runner/XUnitRunner.targets | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/AzureDevOps/SendingJobsToHelix.md b/Documentation/AzureDevOps/SendingJobsToHelix.md index f5055c77cea..ec1a83da7c7 100644 --- a/Documentation/AzureDevOps/SendingJobsToHelix.md +++ b/Documentation/AzureDevOps/SendingJobsToHelix.md @@ -83,7 +83,7 @@ The simplest Helix use-case is zipping up a single folder containing your projec Simply specify the xUnit project(s) you wish to run (semicolon delimited) with the `XUnitProjects` parameter. Then, specify: * the `XUnitPublishTargetFramework` – this is the framework your **test projects are targeting**, e.g. `netcoreapp3.1`. * the `XUnitRuntimeTargetFramework` – this is the framework version of xUnit you want to use from the xUnit NuGet package, e.g. `netcoreapp2.0`. Notably, the xUnit console runner only supports up to netcoreapp2.0 as of 14 March 2018, so this is the target that should be specified for running against any higher version test projects. -* the `XUnitRunnerVersion` (the version of the xUnit nuget package you want to use, e.g. `2.4.2-pre.9`). +* the `XUnitRunnerVersion` (the version of the xUnit nuget package you want to use, e.g. `2.4.2`). Finally, set `IncludeDotNetCli` to true and specify which `DotNetCliPackageType` (`sdk`, `runtime` or `aspnetcore-runtime`) and `DotNetCliVersion` you wish to use. (For a full list of .NET CLI versions/package types, see these links: [3.0](https://dotnet.microsoft.com/download/dotnet-core/3.0), [2.1](https://dotnet.microsoft.com/download/dotnet-core/2.1), [2.2](https://dotnet.microsoft.com/download/dotnet-core/2.2).) @@ -104,7 +104,7 @@ The list of available Helix queues can be found on the [Helix homepage](https:// # XUnitWorkItemTimeout: '00:05:00' -- a timeout (specified as a System.TimeSpan string) for all work items created from XUnitProjects XUnitPublishTargetFramework: netcoreapp3.1 # specify your publish target framework here XUnitRuntimeTargetFramework: netcoreapp2.0 # specify the framework you want to use for the xUnit runner - XUnitRunnerVersion: 2.4.2-pre.9 # specify the version of xUnit runner you wish to use here + XUnitRunnerVersion: 2.4.2 # specify the version of xUnit runner you wish to use here # WorkItemDirectory: '' -- payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects # WorkItemCommand: '' -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects # WorkItemTimeout: '' -- a timeout (specified as a System.TimeSpan string) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects diff --git a/eng/Versions.props b/eng/Versions.props index fa9d100f9db..d563de266bb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -69,7 +69,7 @@ 4.5.2 4.5.0 8.5.0 - 2.4.2-pre.9 + 2.4.2 2.0.3 7.0.0-beta.22419.1 7.0.0-beta.22419.1 diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props index 514433d41ce..54f3d07baec 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props @@ -87,7 +87,7 @@ $(ArcadeSdkVersion) $(ArcadeSdkVersion) 16.5.0 - 2.4.2-pre.9 + 2.4.2 $(XUnitVersion) 2.4.3 diff --git a/src/Microsoft.DotNet.Helix/Sdk/Readme.md b/src/Microsoft.DotNet.Helix/Sdk/Readme.md index 2deab5e4209..d3505094e18 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/Readme.md +++ b/src/Microsoft.DotNet.Helix/Sdk/Readme.md @@ -228,7 +228,7 @@ Given a local folder `$(TestFolder)` containing `runtests.cmd`, this will run `r netcoreapp2.0 - 2.4.2-pre.9 + 2.4.2 diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets index b0525e08ca2..e415fac066e 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets +++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets @@ -3,7 +3,7 @@ net7.0 netcoreapp2.0 - 2.4.2-pre.9 + 2.4.2 <_XUnitPublishTargetsPath>$(MSBuildThisFileDirectory)XUnitPublish.targets From a976403cdb78de6fe8fd440304b139f701dcacef Mon Sep 17 00:00:00 2001 From: Jon Fortescue Date: Mon, 22 Aug 2022 15:30:14 -0700 Subject: [PATCH 08/22] Add reference to loc stats (#10517) --- Documentation/OneLocBuild.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/OneLocBuild.md b/Documentation/OneLocBuild.md index 3ce1d903acb..71aa3bcb956 100644 --- a/Documentation/OneLocBuild.md +++ b/Documentation/OneLocBuild.md @@ -9,6 +9,8 @@ repo. Xliff-Tasks will continue to be used in addition to OneLocBuild. To make OneLocBuild easier to use, we have integrated the task into Arcade. This integration is a job template ([here](/eng/common/templates/job/onelocbuild.yml)) that is described in this document. +To see your repo's current loc configuration, please refer to https://aka.ms/locstats. + ## Onboarding to OneLocBuild Using Arcade Onboarding to OneLocBuild is a simple process: From a4347ce512bea321d8a309d065819ed1f7ab2a0f Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 23 Aug 2022 08:11:16 -0700 Subject: [PATCH 09/22] Add TaskCanceledException to the reasons we retry in DownloadFile task (#10542) --- src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs index 3c8f19e9aca..ef697ada2e2 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs +++ b/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs @@ -160,7 +160,13 @@ private async Tasks.Task DownloadWithRetriesAsync(HttpClient httpClient, s return true; } - catch (Exception e) when (e is HttpRequestException || e is IOException && !(e is DirectoryNotFoundException || e is PathTooLongException)) + // Retry cases: + // 1. Plain Http error + // 2. IOExceptions that aren't definitely deterministic (such as antivirus was scanning the file) + // 3. HttpClient Timeouts - these surface as TaskCanceledExceptions that don't match our cancellation token source + catch (Exception e) when (e is HttpRequestException || + e is IOException && !(e is DirectoryNotFoundException || e is PathTooLongException) || + e is Tasks.TaskCanceledException && ((Tasks.TaskCanceledException)e).CancellationToken != _cancellationSource.Token) { attempt++; From e2fcd61c25c61c6ad0c2a649c8f257077fb1fd88 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 15:17:47 +0000 Subject: [PATCH 10/22] Update dependencies from https://github.com/dotnet/sourcelink build 20220822.2 (#10552) [main] Update dependencies from dotnet/sourcelink --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 58d2c0d8f77..6a097c8c2a8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,14 +55,14 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink - 1f5bb488caa266108e052d980df5e2626d2d80fb + 0bba6b2d342056cb3fb3906f25929a92e063c5f8 - + https://github.com/dotnet/sourcelink - 1f5bb488caa266108e052d980df5e2626d2d80fb + 0bba6b2d342056cb3fb3906f25929a92e063c5f8 https://github.com/dotnet/symreader-converter diff --git a/eng/Versions.props b/eng/Versions.props index d563de266bb..16b8462fe23 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -79,8 +79,8 @@ 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22421-01 - 1.2.0-beta-22421-01 + 1.2.0-beta-22422-02 + 1.2.0-beta-22422-02 7.0.0-beta.22419.1 1.0.0-beta.22420.1 1.1.0-beta.22076.4 From 0db07252ccb18afdf94820ba6125da6de729ec04 Mon Sep 17 00:00:00 2001 From: Michael Stuckey Date: Tue, 23 Aug 2022 12:39:04 -0700 Subject: [PATCH 11/22] Let default(TargetChannelConfig) equal itself (#10547) There are checks expecting that default(TargetChannelConfig).Equals(default(TargetChannelConfig)) be true, but the Equals method does not expect the reference types to be (their default) null. Currently, putting default(TargetChannelConfig) on either side of the equality results in a ArgumentNullException from various paths trying to deference a null type. This PR teaches the Equals method to handle null reference types with acceptance and understanding. Validation was done using new unit tests. Resolves #9908 by letting the .FirstOrDefault() check happen as expected and thus print the helpful error message. --- .../GeneralTests.cs | 91 ++++++++++++++++++- .../src/model/TargetChannelConfig.cs | 34 ++++--- 2 files changed, 112 insertions(+), 13 deletions(-) diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs index 0eb9ae620a4..c70bd1bc54a 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs @@ -3,15 +3,16 @@ using System; using System.IO; +using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; +using FluentAssertions; +using Microsoft.DotNet.Arcade.Test.Common; using Microsoft.DotNet.Build.Tasks.Feed.Model; using Microsoft.DotNet.Build.Tasks.Feed.Tests.TestDoubles; using Xunit; using static Microsoft.DotNet.Build.Tasks.Feed.GeneralUtils; -using FluentAssertions; -using Microsoft.DotNet.Arcade.Test.Common; namespace Microsoft.DotNet.Build.Tasks.Feed.Tests { @@ -172,5 +173,91 @@ await GeneralUtils.CompareLocalPackageToFeedPackage( retryHandler.ActualAttempts.Should().Be(expectedAttemptCount); } + + [Fact] + public void TargetChannelConfig_DefaultAreEqual_Test() + { + // Remember: + // default(TargetChannelConfig) + // is not the same as + // new TargetChannelConfig(default, default, ...) + // The latter uses the constructor, the former does not. + + TargetChannelConfig defaultLeft = default; + TargetChannelConfig defaultRight = default; + + Func action = () => defaultLeft.Equals(defaultRight); + + action.Should().NotThrow(); + + bool actualResult = action(); + + actualResult.Should().BeTrue(); + } + + [Fact] + public void TargetChannelConfig_TargetFeeds_EqualTest() + { + TargetChannelConfig left = new( + id: default, + isInternal: default, + publishingInfraVersion: default, + akaMSChannelNames: default, + targetFeeds: new TargetFeedSpecification[] + { + new (new[] { TargetFeedContentType.Deb }, dummyFeedUrl, AssetSelection.ShippingOnly) + }, + symbolTargetType: default, + filenamesToExclude: default, + flatten: default); + + TargetChannelConfig right = new( + id: default, + isInternal: default, + publishingInfraVersion: default, + akaMSChannelNames: default, + targetFeeds: new TargetFeedSpecification[] + { + new (new[] { TargetFeedContentType.Deb }, dummyFeedUrl, AssetSelection.ShippingOnly) + }, + symbolTargetType: default, + filenamesToExclude: default, + flatten: default); + + bool actualResult = left.Equals(right); + + actualResult.Should().BeTrue(); + } + + [Fact] + public void TargetChannelConfig_TargetFeeds_UnequalTest() + { + TargetChannelConfig left = new( + id: default, + isInternal: default, + publishingInfraVersion: default, + akaMSChannelNames: default, + targetFeeds: new TargetFeedSpecification[] + { + new (new[] { TargetFeedContentType.Deb }, dummyFeedUrl, AssetSelection.ShippingOnly) + }, + symbolTargetType: default, + filenamesToExclude: default, + flatten: default); + + TargetChannelConfig right = new( + id: default, + isInternal: default, + publishingInfraVersion: default, + akaMSChannelNames: default, + targetFeeds: Enumerable.Empty(), + symbolTargetType: default, + filenamesToExclude: default, + flatten: default); + + bool actualResult = left.Equals(right); + + actualResult.Should().BeFalse(); + } } } diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetChannelConfig.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetChannelConfig.cs index 66145befabf..4e9f5964c6d 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetChannelConfig.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetChannelConfig.cs @@ -83,24 +83,36 @@ public override string ToString() public override bool Equals(object other) { if (other is TargetChannelConfig config && + NullAcceptingSequencesEqual(TargetFeeds, config.TargetFeeds) && + NullAcceptingSequencesEqual(AkaMSChannelNames, config.AkaMSChannelNames) && + NullAcceptingSequencesEqual(FilenamesToExclude, config.FilenamesToExclude) && PublishingInfraVersion == config.PublishingInfraVersion && Id == config.Id && - AkaMSChannelNames.SequenceEqual(config.AkaMSChannelNames) && - TargetFeeds.Count == config.TargetFeeds.Count && - TargetFeeds.Zip(config.TargetFeeds, (l, r) => l.Equals(r)).All(b => b) && IsInternal == config.IsInternal && Flatten == config.Flatten) { - if (FilenamesToExclude is null) - return config.FilenamesToExclude is null; - - if (config.FilenamesToExclude is null) - return false; - - return FilenamesToExclude.SequenceEqual(config.FilenamesToExclude); + return true; } return false; + + + static bool NullAcceptingSequencesEqual(IEnumerable left, IEnumerable right) + { + if (left is not null && right is not null) + { + if (!left.SequenceEqual(right)) + { + return false; + } + } + else if ((left is null) ^ (right is null)) + { + return false; + } + + return true; + } } public override int GetHashCode() @@ -162,7 +174,7 @@ public TargetFeedSpecification(IEnumerable contentTypes, if (assets == AssetSelection.All && contentTypes.Contains(TargetFeedContentType.Package)) { - throw new ArgumentException($"Target feed specification for {feedUrl} must have a separated asset selection 'ShippingOnly' and 'NonShippingOnly packages"); + throw new ArgumentException($"Target feed specification for {feedUrl} must have a separated asset selection 'ShippingOnly' and 'NonShippingOnly' packages"); } ContentTypes = contentTypes.ToImmutableList(); From 22f50484104521d3af02c112626fcaaa825c3842 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 11:18:29 +0000 Subject: [PATCH 12/22] Update dependencies from https://github.com/dotnet/xharness build 20220822.1 (#10563) [main] Update dependencies from dotnet/xharness --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6a097c8c2a8..45fd894e68f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -43,9 +43,9 @@ https://github.com/dotnet/arcade-services a5f3ed9d5f560555ff6d26b286acdcfbb7ce3b14 - + https://github.com/dotnet/xharness - 8e340b270ca0c7f7fa8e6e86519d47fb85408e87 + fbeb09787a4cdcf8a375382cf7a4f5edfaf1b9d7 https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 16b8462fe23..8f4e3f680e8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -84,7 +84,7 @@ 7.0.0-beta.22419.1 1.0.0-beta.22420.1 1.1.0-beta.22076.4 - 1.0.0-prerelease.22415.1 + 1.0.0-prerelease.22422.1 2.0.0-preview.1.21526.15 2.0.0-preview.1.21526.15 7.0.100-preview.5.22273.2 From 2c6232a243556c6bb11d1f8c4fe621ac5a1099a1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:11:29 +0000 Subject: [PATCH 13/22] Update dependencies from https://github.com/dotnet/arcade build 20220823.2 (#10564) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 6 +++--- global.json | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 45fd894e68f..77bf7e8f10c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,25 +15,25 @@ - + https://github.com/dotnet/arcade - 34dff939b4a91e4693f78a856e0e055c1a3f3fba + 0db07252ccb18afdf94820ba6125da6de729ec04 - + https://github.com/dotnet/arcade - 34dff939b4a91e4693f78a856e0e055c1a3f3fba + 0db07252ccb18afdf94820ba6125da6de729ec04 - + https://github.com/dotnet/arcade - 34dff939b4a91e4693f78a856e0e055c1a3f3fba + 0db07252ccb18afdf94820ba6125da6de729ec04 - + https://github.com/dotnet/arcade - 34dff939b4a91e4693f78a856e0e055c1a3f3fba + 0db07252ccb18afdf94820ba6125da6de729ec04 - + https://github.com/dotnet/arcade - 34dff939b4a91e4693f78a856e0e055c1a3f3fba + 0db07252ccb18afdf94820ba6125da6de729ec04 https://github.com/dotnet/arcade-services diff --git a/eng/Versions.props b/eng/Versions.props index 8f4e3f680e8..53e532babaa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -71,8 +71,8 @@ 8.5.0 2.4.2 2.0.3 - 7.0.0-beta.22419.1 - 7.0.0-beta.22419.1 + 7.0.0-beta.22423.2 + 7.0.0-beta.22423.2 2.0.0 1.6.0 1.0.0 @@ -81,7 +81,7 @@ 1.1.0-beta.21553.1 1.2.0-beta-22422-02 1.2.0-beta-22422-02 - 7.0.0-beta.22419.1 + 7.0.0-beta.22423.2 1.0.0-beta.22420.1 1.1.0-beta.22076.4 1.0.0-prerelease.22422.1 diff --git a/global.json b/global.json index 72370f36d53..a89679dfd06 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "7.0.100-preview.7.22377.5" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22419.1", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22419.1" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22423.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22423.2" } } From 258a37cd6a7884f771d0f991d9f24d29e292abd0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 15:12:48 +0000 Subject: [PATCH 14/22] Update dependencies from https://github.com/dotnet/sourcelink build 20220823.1 (#10565) [main] Update dependencies from dotnet/sourcelink --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 77bf7e8f10c..13456966c5d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,12 +55,12 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink 0bba6b2d342056cb3fb3906f25929a92e063c5f8 - + https://github.com/dotnet/sourcelink 0bba6b2d342056cb3fb3906f25929a92e063c5f8 diff --git a/eng/Versions.props b/eng/Versions.props index 53e532babaa..de8e56efb5f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -79,8 +79,8 @@ 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22422-02 - 1.2.0-beta-22422-02 + 1.2.0-beta-22423-01 + 1.2.0-beta-22423-01 7.0.0-beta.22423.2 1.0.0-beta.22420.1 1.1.0-beta.22076.4 From 78805162979a2e31d8df1aa962c5657f988116a4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 17:03:54 +0000 Subject: [PATCH 15/22] [main] Update dependencies from dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink (#10584) [main] Update dependencies from dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink --- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 12 ++++++------ global.json | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 13456966c5d..7235cf4c1ca 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,25 +15,25 @@ - + https://github.com/dotnet/arcade - 0db07252ccb18afdf94820ba6125da6de729ec04 + 258a37cd6a7884f771d0f991d9f24d29e292abd0 - + https://github.com/dotnet/arcade - 0db07252ccb18afdf94820ba6125da6de729ec04 + 258a37cd6a7884f771d0f991d9f24d29e292abd0 - + https://github.com/dotnet/arcade - 0db07252ccb18afdf94820ba6125da6de729ec04 + 258a37cd6a7884f771d0f991d9f24d29e292abd0 - + https://github.com/dotnet/arcade - 0db07252ccb18afdf94820ba6125da6de729ec04 + 258a37cd6a7884f771d0f991d9f24d29e292abd0 - + https://github.com/dotnet/arcade - 0db07252ccb18afdf94820ba6125da6de729ec04 + 258a37cd6a7884f771d0f991d9f24d29e292abd0 https://github.com/dotnet/arcade-services @@ -55,14 +55,14 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink - 0bba6b2d342056cb3fb3906f25929a92e063c5f8 + e57efa1ed395dd6975b33052719facb24f03ee0b - + https://github.com/dotnet/sourcelink - 0bba6b2d342056cb3fb3906f25929a92e063c5f8 + e57efa1ed395dd6975b33052719facb24f03ee0b https://github.com/dotnet/symreader-converter @@ -72,9 +72,9 @@ https://github.com/dotnet/symreader-converter c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0 - + https://github.com/dotnet/xliff-tasks - d106fdda2b3eda55f12e72977de336ab3afa1d91 + f086adcd41b23ca0933327b6dafd5d878fc025c8 diff --git a/eng/Versions.props b/eng/Versions.props index de8e56efb5f..8449edd28ac 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -71,18 +71,18 @@ 8.5.0 2.4.2 2.0.3 - 7.0.0-beta.22423.2 - 7.0.0-beta.22423.2 + 7.0.0-beta.22424.3 + 7.0.0-beta.22424.3 2.0.0 1.6.0 1.0.0 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22423-01 - 1.2.0-beta-22423-01 - 7.0.0-beta.22423.2 - 1.0.0-beta.22420.1 + 1.2.0-beta-22424-02 + 1.2.0-beta-22424-02 + 7.0.0-beta.22424.3 + 1.0.0-beta.22424.2 1.1.0-beta.22076.4 1.0.0-prerelease.22422.1 2.0.0-preview.1.21526.15 diff --git a/global.json b/global.json index a89679dfd06..e86f083380e 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "7.0.100-preview.7.22377.5" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22423.2", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22423.2" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22424.3", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22424.3" } } From 692746db3f08766bc29e91e826ff15e5e8a82b44 Mon Sep 17 00:00:00 2001 From: Andrii Patsula Date: Fri, 26 Aug 2022 14:41:50 +0200 Subject: [PATCH 16/22] Introduced skeleton for a Roslyn-based GenAPI (#10411). (#10567) * Introduced skeleton for a Roslyn-based GenAPI (#10411). Created Microsoft.DotNet.GenAPI.Shared, Microsoft.DotNet.GenAPI.Tasks, Microsoft.DotNet.GenAPI.Tool projects. Added interfaces for assembly loading, filtering and ordering symbol assemblies. Added README.md for GenAPI. --- Arcade.sln | 47 +++++++++++++++++++ eng/Versions.props | 1 + .../Microsoft.DotNet.GenAPI.csproj | 6 +++ src/Microsoft.DotNet.GenAPI/README.md | 12 +++++ .../Shared/AssemblySymbolLoader.cs | 38 +++++++++++++++ .../Shared/IAssemblySymbolFilter.cs | 41 ++++++++++++++++ .../Shared/IAssemblySymbolLoader.cs | 29 ++++++++++++ .../Shared/IAssemblySymbolOrderProvider.cs | 35 ++++++++++++++ .../Microsoft.DotNet.GenAPI.Shared.csproj | 16 +++++++ .../Tasks/GenAPITask.cs | 17 +++++++ .../Microsoft.DotNet.GenAPI.Tasks.csproj | 26 ++++++++++ .../Tool/Microsoft.DotNet.GenAPI.Tool.csproj | 13 +++++ src/Microsoft.DotNet.GenAPI/Tool/Program.cs | 15 ++++++ 13 files changed, 296 insertions(+) create mode 100644 src/Microsoft.DotNet.GenAPI/README.md create mode 100644 src/Microsoft.DotNet.GenAPI/Shared/AssemblySymbolLoader.cs create mode 100644 src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolFilter.cs create mode 100644 src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolLoader.cs create mode 100644 src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolOrderProvider.cs create mode 100644 src/Microsoft.DotNet.GenAPI/Shared/Microsoft.DotNet.GenAPI.Shared.csproj create mode 100644 src/Microsoft.DotNet.GenAPI/Tasks/GenAPITask.cs create mode 100644 src/Microsoft.DotNet.GenAPI/Tasks/Microsoft.DotNet.GenAPI.Tasks.csproj create mode 100644 src/Microsoft.DotNet.GenAPI/Tool/Microsoft.DotNet.GenAPI.Tool.csproj create mode 100644 src/Microsoft.DotNet.GenAPI/Tool/Program.cs diff --git a/Arcade.sln b/Arcade.sln index 26ae909af3f..b6fae28925c 100644 --- a/Arcade.sln +++ b/Arcade.sln @@ -145,6 +145,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Build.Task EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.ApiCompat.Core", "src\Microsoft.DotNet.ApiCompat\src\Microsoft.DotNet.ApiCompat.Core\Microsoft.DotNet.ApiCompat.Core.csproj", "{90FA5F6B-5C96-44EF-BB83-4AFF62A1CF8B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.DotNet.GenAPIv2", "Microsoft.DotNet.GenAPIv2", "{898AA2C6-9A76-4C0F-9DC3-518CDAA99087}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Shared", "src\Microsoft.DotNet.GenAPI\Shared\Microsoft.DotNet.GenAPI.Shared.csproj", "{4710F39B-B555-4B9B-AD4C-FBC777C87A1C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tool", "src\Microsoft.DotNet.GenAPI\Tool\Microsoft.DotNet.GenAPI.Tool.csproj", "{5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.GenAPI.Tasks", "src\Microsoft.DotNet.GenAPI\Tasks\Microsoft.DotNet.GenAPI.Tasks.csproj", "{79AD710B-57F4-41CA-AC2F-42625B8978FD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -919,6 +927,42 @@ Global {90FA5F6B-5C96-44EF-BB83-4AFF62A1CF8B}.Release|x64.Build.0 = Release|Any CPU {90FA5F6B-5C96-44EF-BB83-4AFF62A1CF8B}.Release|x86.ActiveCfg = Release|Any CPU {90FA5F6B-5C96-44EF-BB83-4AFF62A1CF8B}.Release|x86.Build.0 = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|x64.ActiveCfg = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|x64.Build.0 = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|x86.ActiveCfg = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Debug|x86.Build.0 = Debug|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|Any CPU.Build.0 = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|x64.ActiveCfg = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|x64.Build.0 = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|x86.ActiveCfg = Release|Any CPU + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C}.Release|x86.Build.0 = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|x64.ActiveCfg = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|x64.Build.0 = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|x86.ActiveCfg = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Debug|x86.Build.0 = Debug|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|Any CPU.Build.0 = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|x64.ActiveCfg = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|x64.Build.0 = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|x86.ActiveCfg = Release|Any CPU + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0}.Release|x86.Build.0 = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|x64.ActiveCfg = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|x64.Build.0 = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|x86.ActiveCfg = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Debug|x86.Build.0 = Debug|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|Any CPU.Build.0 = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|x64.ActiveCfg = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|x64.Build.0 = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|x86.ActiveCfg = Release|Any CPU + {79AD710B-57F4-41CA-AC2F-42625B8978FD}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -957,6 +1001,9 @@ Global {0B5D3C20-EB58-4A82-A3AA-2E626A17B35D} = {C53DD924-C212-49EA-9BC4-1827421361EF} {FB4168D5-6EA6-4777-AD4F-95758C177FE8} = {C53DD924-C212-49EA-9BC4-1827421361EF} {90FA5F6B-5C96-44EF-BB83-4AFF62A1CF8B} = {E41E23C4-5CB0-4C61-9E05-EEFFEC4B356D} + {4710F39B-B555-4B9B-AD4C-FBC777C87A1C} = {898AA2C6-9A76-4C0F-9DC3-518CDAA99087} + {5CF1A5F1-31FE-46F0-9F45-971BD6B508D0} = {898AA2C6-9A76-4C0F-9DC3-518CDAA99087} + {79AD710B-57F4-41CA-AC2F-42625B8978FD} = {898AA2C6-9A76-4C0F-9DC3-518CDAA99087} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {32B9C883-432E-4FC8-A1BF-090EB033DD5B} diff --git a/eng/Versions.props b/eng/Versions.props index 8449edd28ac..c8bae65abfa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -31,6 +31,7 @@ 2.6.3 2.9.0 3.8.0 + 4.3.0-3.final 3.17.2 2.3.13 2.1.0 diff --git a/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj b/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj index 480d88cf977..b93bf81dbcd 100644 --- a/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj +++ b/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj @@ -8,10 +8,16 @@ An msbuild task to generate code for the API surface of an assembly. $(NoWarn);0436 Major + false + + + + + diff --git a/src/Microsoft.DotNet.GenAPI/README.md b/src/Microsoft.DotNet.GenAPI/README.md new file mode 100644 index 00000000000..7756d2824b0 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/README.md @@ -0,0 +1,12 @@ +Microsoft.DotNet.GenAPI +=============================== + +Contains GenAPITask - MSBuild task that allows to synthesize C# source tree out of a dll. +The project is build on top of Microsoft.CCI and Microsoft.CCI.Extensions. + +Currently, new Roslyn-based GenAPIv2 is in development in folders: +* Shared - common library for Tool and Tasks. +* Tasks - MSBuild tasks for GenAPIv2. +* Tool - CLI tool used to generate reference assemblies out of executable and produce output in console or to file. + +We'll remove the original CCI-based implementation after GenAPIv2 is ready. \ No newline at end of file diff --git a/src/Microsoft.DotNet.GenAPI/Shared/AssemblySymbolLoader.cs b/src/Microsoft.DotNet.GenAPI/Shared/AssemblySymbolLoader.cs new file mode 100644 index 00000000000..fa01cad1c13 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Shared/AssemblySymbolLoader.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.IO; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; + +namespace Microsoft.DotNet.GenAPI.Shared +{ + internal class AssemblySymbolLoader : IAssemblySymbolLoader + { + public IAssemblySymbol? LoadAssembly(string path) + { + using var stream = File.OpenRead(path); + return LoadAssembly(stream); + } + + public IAssemblySymbol? LoadAssembly(Stream stream) + { + PortableExecutableReference reference; + + using (var memoryStream = new MemoryStream()) + { + stream.CopyTo(memoryStream); + memoryStream.Position = 0; + + // MetadataReference.CreateFromStream closes the stream + reference = MetadataReference.CreateFromStream(memoryStream); + } + + var compilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable); + var compilation = CSharpCompilation.Create($"AssemblyLoader_{DateTime.Now:MM_dd_yy_HH_mm_ss_FFF}", options: compilationOptions); + + return compilation.GetAssemblyOrModuleSymbol(reference) as IAssemblySymbol; + } + } +} diff --git a/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolFilter.cs b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolFilter.cs new file mode 100644 index 00000000000..b4f10ed1fa9 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolFilter.cs @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.CodeAnalysis; + +namespace Microsoft.DotNet.GenAPI.Shared +{ + /// + /// Interface responsible for filtering attributes, namespaces, types and members. + /// + public interface IAssemblySymbolFilter + { + /// + /// Including/fitlering out namespace symbol and it's types, members. + /// + /// Object of . + /// Returns boolean value. + bool Include(INamespaceSymbol ns); + + /// + /// Including/fitlering out attribute data. + /// + /// Object of . + /// Returns boolean value. + bool Include(AttributeData at); + + /// + /// Including/fitlering out type symbol and it's members . + /// + /// Object of . + /// Returns boolean value. + bool Include(ITypeSymbol ts); + + /// + /// Including/fitlering out member symbol. + /// + /// Object of . + /// Returns boolean value. + bool Include(ISymbol member); + } +} diff --git a/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolLoader.cs b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolLoader.cs new file mode 100644 index 00000000000..26b742d003e --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolLoader.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO; +using Microsoft.CodeAnalysis; + +namespace Microsoft.DotNet.GenAPI.Shared +{ + + /// + /// Interface responsible for creating Compilation Factory and loading out of binaries. + /// + public interface IAssemblySymbolLoader + { + /// + /// Loads an assembly from the provided path. + /// + /// The full path to the assembly. + /// representing the loaded assembly. + IAssemblySymbol? LoadAssembly(string path); + + /// + /// Loads an assembly from a given . + /// + /// The stream to read the metadata from. + /// respresenting the given . + IAssemblySymbol? LoadAssembly(Stream stream); + } +} diff --git a/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolOrderProvider.cs b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolOrderProvider.cs new file mode 100644 index 00000000000..d74627dc9ea --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Shared/IAssemblySymbolOrderProvider.cs @@ -0,0 +1,35 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using Microsoft.CodeAnalysis; + +namespace Microsoft.DotNet.GenAPI.Shared +{ + /// + /// Interface provides ordering for namespaces, types and members. + /// + internal interface IAssemblySymbolOrderProvider + { + /// + /// Sorts the elements of a INamespaceSymbol. + /// + /// List of namespaces to be sorted. + /// Returns namespaces in sorted order. + IEnumerable OrderNamespaces(IEnumerable namespaces); + + /// + /// Sorts the elements of a ITypeSymbol. + /// + /// List of TypeMembers to be sorted. + /// Returns TypeMembers in sorted order. + IEnumerable OrderTypes(IEnumerable symbols) where T : ITypeSymbol; + + /// + /// Sorts the elements of a ISymbol. + /// + /// List of Members to be sorted. + /// Returns Members in sorted order. + IEnumerable OrderMembers(IEnumerable members); + } +} diff --git a/src/Microsoft.DotNet.GenAPI/Shared/Microsoft.DotNet.GenAPI.Shared.csproj b/src/Microsoft.DotNet.GenAPI/Shared/Microsoft.DotNet.GenAPI.Shared.csproj new file mode 100644 index 00000000000..28af1db80a4 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Shared/Microsoft.DotNet.GenAPI.Shared.csproj @@ -0,0 +1,16 @@ + + + $(TargetFrameworkForNETSDK) + true + true + enable + + + + + + + + + + diff --git a/src/Microsoft.DotNet.GenAPI/Tasks/GenAPITask.cs b/src/Microsoft.DotNet.GenAPI/Tasks/GenAPITask.cs new file mode 100644 index 00000000000..dc55393c010 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Tasks/GenAPITask.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Microsoft.Build.Framework; +using Microsoft.DotNet.Build.Tasks; + +namespace Microsoft.DotNet.GenAPI.Tasks +{ + public class GenAPITask : BuildTask + { + public override bool Execute() + { + return false; + } + } +} diff --git a/src/Microsoft.DotNet.GenAPI/Tasks/Microsoft.DotNet.GenAPI.Tasks.csproj b/src/Microsoft.DotNet.GenAPI/Tasks/Microsoft.DotNet.GenAPI.Tasks.csproj new file mode 100644 index 00000000000..759c364f9bd --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Tasks/Microsoft.DotNet.GenAPI.Tasks.csproj @@ -0,0 +1,26 @@ + + + + $(TargetFrameworkForNETSDK) + true + MSBuildSdk + true + Major + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.DotNet.GenAPI/Tool/Microsoft.DotNet.GenAPI.Tool.csproj b/src/Microsoft.DotNet.GenAPI/Tool/Microsoft.DotNet.GenAPI.Tool.csproj new file mode 100644 index 00000000000..427c28342fb --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Tool/Microsoft.DotNet.GenAPI.Tool.csproj @@ -0,0 +1,13 @@ + + + $(TargetFrameworkForNETSDK) + true + Exe + true + true + + + + + + diff --git a/src/Microsoft.DotNet.GenAPI/Tool/Program.cs b/src/Microsoft.DotNet.GenAPI/Tool/Program.cs new file mode 100644 index 00000000000..586fd2aee43 --- /dev/null +++ b/src/Microsoft.DotNet.GenAPI/Tool/Program.cs @@ -0,0 +1,15 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace Microsoft.DotNet.GenAPI.Tool +{ + class Program + { + static int Main(string[] args) + { + return 0; + } + } +} From 70c74449139a66c5a11aa14dba05d12b57ff4269 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 14:30:53 +0000 Subject: [PATCH 17/22] [main] Update dependencies from dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink (#10597) [main] Update dependencies from dotnet/xliff-tasks dotnet/arcade dotnet/sourcelink --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 12 ++++++------ global.json | 4 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7235cf4c1ca..ce4c04d5707 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -15,25 +15,25 @@ - + https://github.com/dotnet/arcade - 258a37cd6a7884f771d0f991d9f24d29e292abd0 + 78805162979a2e31d8df1aa962c5657f988116a4 - + https://github.com/dotnet/arcade - 258a37cd6a7884f771d0f991d9f24d29e292abd0 + 78805162979a2e31d8df1aa962c5657f988116a4 - + https://github.com/dotnet/arcade - 258a37cd6a7884f771d0f991d9f24d29e292abd0 + 78805162979a2e31d8df1aa962c5657f988116a4 - + https://github.com/dotnet/arcade - 258a37cd6a7884f771d0f991d9f24d29e292abd0 + 78805162979a2e31d8df1aa962c5657f988116a4 - + https://github.com/dotnet/arcade - 258a37cd6a7884f771d0f991d9f24d29e292abd0 + 78805162979a2e31d8df1aa962c5657f988116a4 https://github.com/dotnet/arcade-services @@ -55,12 +55,12 @@ https://github.com/dotnet/linker 3efd231da430baa0fd670e278f6b5c3e62834bde - + https://github.com/dotnet/sourcelink e57efa1ed395dd6975b33052719facb24f03ee0b - + https://github.com/dotnet/sourcelink e57efa1ed395dd6975b33052719facb24f03ee0b @@ -72,9 +72,9 @@ https://github.com/dotnet/symreader-converter c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0 - + https://github.com/dotnet/xliff-tasks - f086adcd41b23ca0933327b6dafd5d878fc025c8 + e0068bf9c8bf13d84d77f19a2628e910bdabdae7 diff --git a/eng/Versions.props b/eng/Versions.props index c8bae65abfa..052a7b4eda0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -72,18 +72,18 @@ 8.5.0 2.4.2 2.0.3 - 7.0.0-beta.22424.3 - 7.0.0-beta.22424.3 + 7.0.0-beta.22425.1 + 7.0.0-beta.22425.1 2.0.0 1.6.0 1.0.0 2.0.4 1.1.0-beta2-19575-01 1.1.0-beta.21553.1 - 1.2.0-beta-22424-02 - 1.2.0-beta-22424-02 - 7.0.0-beta.22424.3 - 1.0.0-beta.22424.2 + 1.2.0-beta-22425-01 + 1.2.0-beta-22425-01 + 7.0.0-beta.22425.1 + 1.0.0-beta.22425.1 1.1.0-beta.22076.4 1.0.0-prerelease.22422.1 2.0.0-preview.1.21526.15 diff --git a/global.json b/global.json index e86f083380e..6bae13fd8d9 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "7.0.100-preview.7.22377.5" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22424.3", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22424.3" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22425.1", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22425.1" } } From 72484cba521b7783a5188ddef164f7b308a9c0a8 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Fri, 26 Aug 2022 18:35:55 +0300 Subject: [PATCH 18/22] Allow specifying lldb version > 6 (#10520) * Allow specifying lldb version > 6 * Recognize Ubuntu focal and jammy --- eng/common/cross/arm/sources.list.focal | 11 ++++++ eng/common/cross/arm/sources.list.jammy | 11 ++++++ eng/common/cross/arm64/sources.list.focal | 11 ++++++ eng/common/cross/arm64/sources.list.jammy | 11 ++++++ eng/common/cross/build-rootfs.sh | 41 +++++++++++++---------- eng/common/cross/x86/sources.list.focal | 11 ++++++ eng/common/cross/x86/sources.list.jammy | 11 ++++++ 7 files changed, 89 insertions(+), 18 deletions(-) create mode 100644 eng/common/cross/arm/sources.list.focal create mode 100644 eng/common/cross/arm/sources.list.jammy create mode 100644 eng/common/cross/arm64/sources.list.focal create mode 100644 eng/common/cross/arm64/sources.list.jammy create mode 100644 eng/common/cross/x86/sources.list.focal create mode 100644 eng/common/cross/x86/sources.list.jammy diff --git a/eng/common/cross/arm/sources.list.focal b/eng/common/cross/arm/sources.list.focal new file mode 100644 index 00000000000..4de2600c174 --- /dev/null +++ b/eng/common/cross/arm/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jammy b/eng/common/cross/arm/sources.list.jammy new file mode 100644 index 00000000000..6bb0453029c --- /dev/null +++ b/eng/common/cross/arm/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.focal b/eng/common/cross/arm64/sources.list.focal new file mode 100644 index 00000000000..4de2600c174 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.jammy b/eng/common/cross/arm64/sources.list.jammy new file mode 100644 index 00000000000..6bb0453029c --- /dev/null +++ b/eng/common/cross/arm64/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 032f5f19373..5680980fa29 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -186,32 +186,27 @@ while :; do __UbuntuArch=i386 __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" ;; - lldb3.6) - __LLDB_Package="lldb-3.6-dev" - ;; - lldb3.8) - __LLDB_Package="lldb-3.8-dev" - ;; - lldb3.9) - __LLDB_Package="liblldb-3.9-dev" - ;; - lldb4.0) - __LLDB_Package="liblldb-4.0-dev" - ;; - lldb5.0) - __LLDB_Package="liblldb-5.0-dev" - ;; - lldb6.0) - __LLDB_Package="liblldb-6.0-dev" + lldb*) + version="${lowerI/lldb/}" + parts=(${version//./ }) + + # for versions > 6.0, lldb has dropped the minor version + if [[ "${parts[0]}" -gt 6 ]]; then + version="${parts[0]}" + fi + + __LLDB_Package="liblldb-${version}-dev" ;; no-lldb) unset __LLDB_Package ;; llvm*) - version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + version="${lowerI/llvm/}" parts=(${version//./ }) __LLVM_MajorVersion="${parts[0]}" __LLVM_MinorVersion="${parts[1]}" + + # for versions > 6.0, llvm has dropped the minor version if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then __LLVM_MinorVersion=0; fi @@ -231,6 +226,16 @@ while :; do __CodeName=bionic fi ;; + focal) # Ubuntu 20.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=focal + fi + ;; + jammy) # Ubuntu 22.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=jammy + fi + ;; jessie) # Debian 8 __CodeName=jessie __UbuntuRepo="http://ftp.debian.org/debian/" diff --git a/eng/common/cross/x86/sources.list.focal b/eng/common/cross/x86/sources.list.focal new file mode 100644 index 00000000000..99d5731330e --- /dev/null +++ b/eng/common/cross/x86/sources.list.focal @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/x86/sources.list.jammy b/eng/common/cross/x86/sources.list.jammy new file mode 100644 index 00000000000..af1c1feaeac --- /dev/null +++ b/eng/common/cross/x86/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse From b084bccb9a1930cf8536173df680cb68df9802af Mon Sep 17 00:00:00 2001 From: Roman Konecny Date: Fri, 26 Aug 2022 10:02:19 -0700 Subject: [PATCH 19/22] Fix for msbuild server - InstallDotNetCore task outputs list of required dotnets to be installed (#10585) * InstallDotNetCore task outputs list of required dotnets to be installed and target does Exec it. * Spelling * Exec ingores stderror from install script Co-authored-by: Matt Galbraith Co-authored-by: Matt Galbraith --- .../src/InstallDotNetCore.cs | 27 +++++++++---------- .../tools/InstallDotNetCore.targets | 7 ++++- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs index b818c698855..2f0e8dd2232 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs +++ b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs @@ -4,7 +4,6 @@ using NuGet.Versioning; using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -35,8 +34,13 @@ public class InstallDotNetCore : Microsoft.Build.Utilities.Task public string RuntimeSourceFeedKey { get; set; } + [Output] + public ITaskItem[] ToBeInstalled { get; set; } + public override bool Execute() { + ToBeInstalled = Array.Empty(); + if (!File.Exists(GlobalJsonPath)) { Log.LogWarning($"Unable to find global.json file '{GlobalJsonPath} exiting"); @@ -88,6 +92,7 @@ public override bool Execute() } } + var toBeInstalled = new List(); foreach (var runtimeItem in runtimeItems) { foreach (var item in runtimeItem.Value) @@ -133,21 +138,15 @@ public override bool Execute() arguments += $" -runtimeSourceFeedKey {RuntimeSourceFeedKey}"; } - Log.LogMessage(MessageImportance.Low, $"Executing: {DotNetInstallScript} {arguments}"); - var process = Process.Start(new ProcessStartInfo() - { - FileName = DotNetInstallScript, - Arguments = arguments, - UseShellExecute = false - }); - process.WaitForExit(); - if (process.ExitCode != 0) - { - Log.LogError("dotnet-install failed"); - } + Log.LogMessage(MessageImportance.Low, $"To be installed: {DotNetInstallScript} {arguments}"); + // As opposed to start installation process from here, we output list of all required install script arguments, + // so it can be executed by Exec task on msbuild Target level. + // See https://github.com/dotnet/msbuild/issues/7913 for more info. + toBeInstalled.Add(new TaskItem(arguments)); } } - } + } + ToBeInstalled = toBeInstalled.ToArray(); } } } diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets index 5103c5b2dc1..610f4dbf3b1 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets @@ -18,7 +18,12 @@ DotNetInstallScript="$(_DotNetInstallScript)" Platform="$(Platform)" RuntimeSourceFeed="$(DotNetRuntimeSourceFeed)" - RuntimeSourceFeedKey="$(DotNetRuntimeSourceFeedKey)"/> + RuntimeSourceFeedKey="$(DotNetRuntimeSourceFeedKey)"> + + + + + From 694dab16e0c7693688008384bf40f3c9483f2484 Mon Sep 17 00:00:00 2001 From: Epsitha Ananth <47157394+epananth@users.noreply.github.com> Date: Fri, 26 Aug 2022 10:08:08 -0700 Subject: [PATCH 20/22] Force .NET rollforward for SBOM ManifestTool (#10596) --- .../tools/VisualStudio.SetupPackage.vsmanproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.SetupPackage.vsmanproj b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.SetupPackage.vsmanproj index 0be3a962b0e..64a58a3a35c 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.SetupPackage.vsmanproj +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.SetupPackage.vsmanproj @@ -104,7 +104,7 @@ - + From 9180242f8f2391b3d0cf64533ae3fd45b419a680 Mon Sep 17 00:00:00 2001 From: Epsitha Ananth <47157394+epananth@users.noreply.github.com> Date: Fri, 26 Aug 2022 15:02:18 -0700 Subject: [PATCH 21/22] Non-determinism in publishing in presence of errors (#10484) * Read only the local state --- .../src/PublishArtifactsInManifestBase.cs | 51 ++++++++++++------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs index e50c114ee6b..5e5fe15e93d 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs @@ -410,6 +410,7 @@ public async Task PublishSymbolsUsingStreamingAsync( Dictionary> buildAssets, SemaphoreSlim clientThrottle) { + bool failed = false; Log.LogMessage(MessageImportance.High, $"Performing symbol publishing... \nExpirationInDays : {ExpirationInDays} \nConvertPortablePdbsToWindowsPdb : false \ndryRun: false "); var symbolCategory = TargetFeedContentType.Symbols; @@ -417,10 +418,6 @@ public async Task PublishSymbolsUsingStreamingAsync( using HttpClient httpClient = CreateAzdoClient(AzureDevOpsOrg, false, AzureProject); string containerId = await GetContainerIdAsync(httpClient, ArtifactName.BlobArtifacts); - if (Log.HasLoggedErrors) - { - return; - } HashSet symbolsToPublish = new HashSet(); //Get all the symbol file names @@ -518,6 +515,7 @@ await PublishSymbolsHelper.PublishAsync( } catch (Exception ex) { + failed = true; Log.LogError(ex.Message); } @@ -526,6 +524,11 @@ await PublishSymbolsHelper.PublishAsync( $"Symbol publishing for {symbol} took {gatherSymbolPublishingTime.ElapsedMilliseconds / 1000.0} (seconds)"); } + if (failed) + { + return; + } + DeleteTemporaryDirectory(temporarySymbolsDirectory); } finally @@ -1167,14 +1170,10 @@ private async Task PublishPackagesUsingStreamingToAzdoNugetAsync( TargetFeedConfig feedConfig, SemaphoreSlim clientThrottle) { + bool failed = false; using HttpClient httpClient = CreateAzdoClient(AzureDevOpsOrg, false, AzureProject); string containerId = await GetContainerIdAsync(httpClient, ArtifactName.PackageArtifacts); - if (Log.HasLoggedErrors) - { - return; - } - using HttpClient client = CreateAzdoClient(AzureDevOpsOrg, true); await Task.WhenAll(packagesToPublish.Select(async package => @@ -1200,12 +1199,19 @@ await DownloadFileAsync( if (!File.Exists(localPackagePath)) { + failed = true; Log.LogError( $"Could not locate '{package.Id}.{package.Version}' at '{localPackagePath}'"); return; } gatherPackageDownloadTime.Stop(); + + if (failed) + { + return; + } + Log.LogMessage(MessageImportance.Low, $"Time taken to download file to '{localPackagePath}' is {gatherPackageDownloadTime.ElapsedMilliseconds / 1000.0} (seconds)"); Log.LogMessage(MessageImportance.Low, $"Successfully downloaded package : {packageFilename} to {localPackagePath}"); @@ -1523,13 +1529,10 @@ private async Task PublishBlobsUsingStreamingToAzDoNugetAsync( TargetFeedConfig feedConfig, SemaphoreSlim clientThrottle) { + bool failed = false; using HttpClient httpClient = CreateAzdoClient(AzureDevOpsOrg, false, AzureProject); string containerId = await GetContainerIdAsync(httpClient, ArtifactName.BlobArtifacts); - if (Log.HasLoggedErrors) - { - return; - } using HttpClient client = CreateAzdoClient(AzureDevOpsOrg, true, AzureProject); await Task.WhenAll(blobsToPublish.Select(async blob => @@ -1559,9 +1562,16 @@ await DownloadFileAsync( if (!File.Exists(localBlobPath)) { + failed = true; Log.LogError($"Could not locate '{blob.Id} at '{localBlobPath}'"); } gatherBlobDownloadTime.Stop(); + + if (failed) + { + return; + } + Log.LogMessage(MessageImportance.Low, $"Time taken to download file to '{localBlobPath}' is {gatherBlobDownloadTime.ElapsedMilliseconds / 1000.0} (seconds)"); Log.LogMessage(MessageImportance.Low, @@ -1695,13 +1705,10 @@ private async Task PublishAssetsUsingStreamingPublishingAsync( TargetFeedConfig feedConfig, SemaphoreSlim clientThrottle) { + bool failed = false; using HttpClient httpClient = CreateAzdoClient(AzureDevOpsOrg, false, AzureProject); string containerId = await GetContainerIdAsync(httpClient, ArtifactName.BlobArtifacts); - if (Log.HasLoggedErrors) - { - return; - } var pushOptions = new PushOptions { AllowOverwrite = feedConfig.AllowOverwrite, @@ -1730,6 +1737,7 @@ await DownloadFileAsync( if (!File.Exists(localBlobPath)) { + failed = true; Log.LogError($"Could not locate '{asset} at '{localBlobPath}'"); } else @@ -1750,6 +1758,10 @@ await DownloadFileAsync( Log.LogMessage(MessageImportance.Low, $"Publishing {localBlobPath} completed in {gatherBlobPublishingTime.ElapsedMilliseconds / 1000.0} (seconds)"); } + if (failed) + { + return; + } DeleteTemporaryDirectory(temporaryBlobDirectory); } @@ -1762,13 +1774,16 @@ private async Task PublishAssetsWithoutStreamingPublishingAsync( Dictionary> buildAssets, TargetFeedConfig feedConfig) { + bool failed = false; var assets = assetsToPublish .Select(asset => { var fileName = Path.GetFileName(asset); var localBlobPath = Path.Combine(BlobAssetsBasePath, fileName); + if (!File.Exists(localBlobPath)) { + failed = true; Log.LogError($"Could not locate '{asset} at '{localBlobPath}'"); } @@ -1776,7 +1791,7 @@ private async Task PublishAssetsWithoutStreamingPublishingAsync( }) .ToArray(); - if (Log.HasLoggedErrors) + if (failed) { return; } From 14df52bae2c74fc850a8c40fe68ea5be5cd30116 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Fri, 26 Aug 2022 16:05:03 -0700 Subject: [PATCH 22/22] Revert "Fix for msbuild server - InstallDotNetCore task outputs list of required dotnets to be installed (#10585)" (#10608) This reverts commit b084bccb9a1930cf8536173df680cb68df9802af. --- .../src/InstallDotNetCore.cs | 27 ++++++++++--------- .../tools/InstallDotNetCore.targets | 7 +---- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs index 2f0e8dd2232..b818c698855 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs +++ b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs @@ -4,6 +4,7 @@ using NuGet.Versioning; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -34,13 +35,8 @@ public class InstallDotNetCore : Microsoft.Build.Utilities.Task public string RuntimeSourceFeedKey { get; set; } - [Output] - public ITaskItem[] ToBeInstalled { get; set; } - public override bool Execute() { - ToBeInstalled = Array.Empty(); - if (!File.Exists(GlobalJsonPath)) { Log.LogWarning($"Unable to find global.json file '{GlobalJsonPath} exiting"); @@ -92,7 +88,6 @@ public override bool Execute() } } - var toBeInstalled = new List(); foreach (var runtimeItem in runtimeItems) { foreach (var item in runtimeItem.Value) @@ -138,15 +133,21 @@ public override bool Execute() arguments += $" -runtimeSourceFeedKey {RuntimeSourceFeedKey}"; } - Log.LogMessage(MessageImportance.Low, $"To be installed: {DotNetInstallScript} {arguments}"); - // As opposed to start installation process from here, we output list of all required install script arguments, - // so it can be executed by Exec task on msbuild Target level. - // See https://github.com/dotnet/msbuild/issues/7913 for more info. - toBeInstalled.Add(new TaskItem(arguments)); + Log.LogMessage(MessageImportance.Low, $"Executing: {DotNetInstallScript} {arguments}"); + var process = Process.Start(new ProcessStartInfo() + { + FileName = DotNetInstallScript, + Arguments = arguments, + UseShellExecute = false + }); + process.WaitForExit(); + if (process.ExitCode != 0) + { + Log.LogError("dotnet-install failed"); + } } } - } - ToBeInstalled = toBeInstalled.ToArray(); + } } } } diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets index 610f4dbf3b1..5103c5b2dc1 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets @@ -18,12 +18,7 @@ DotNetInstallScript="$(_DotNetInstallScript)" Platform="$(Platform)" RuntimeSourceFeed="$(DotNetRuntimeSourceFeed)" - RuntimeSourceFeedKey="$(DotNetRuntimeSourceFeedKey)"> - - - - - + RuntimeSourceFeedKey="$(DotNetRuntimeSourceFeedKey)"/>