Skip to content

Commit dbc4414

Browse files
[main] Source code updates from dotnet/dotnet (#15846)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 15c9718 commit dbc4414

File tree

11 files changed

+36
-113
lines changed

11 files changed

+36
-113
lines changed

Documentation/UnifiedBuild/Unified-Build-Controls.md

Lines changed: 6 additions & 86 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="arcade" Sha="ad8565092bbfdd5c8b4a94a718d10b2d394f7aee" BarId="268384" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="arcade" Sha="170498a9429a5553fe7ac0ec2341d19bbb97cbe8" BarId="268722" />
44
<ProductDependencies>
55
</ProductDependencies>
66
<ToolsetDependencies>

eng/common/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function Build {
127127
/p:Deploy=$deploy `
128128
/p:Test=$test `
129129
/p:Pack=$pack `
130-
/p:DotNetBuildRepo=$productBuild `
130+
/p:DotNetBuild=$productBuild `
131131
/p:IntegrationTest=$integrationTest `
132132
/p:PerformanceTest=$performanceTest `
133133
/p:Sign=$sign `

eng/common/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function Build {
241241
/p:RepoRoot="$repo_root" \
242242
/p:Restore=$restore \
243243
/p:Build=$build \
244-
/p:DotNetBuildRepo=$product_build \
244+
/p:DotNetBuild=$product_build \
245245
/p:DotNetBuildSourceOnly=$source_build \
246246
/p:Rebuild=$rebuild \
247247
/p:Test=$test \

src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
Optional parameters:
1111
Configuration Build configuration: "Debug", "Release", etc.
1212
13-
DotNetBuildRepo Build the repo as part of the entire .NET stack.
13+
DotNetBuild Build the repo as part of the entire .NET stack.
1414
DotNetBuildOrchestrator Build the entire .NET stack.
1515
DotNetBuildPass While building the repo as part of the entire .NET stack, this parameter specifies which build pass the current build is part of.
16-
DotNetBuildSourceOnly Build the repo as part of the entire .NET stack with no external dependencies.
16+
DotNetBuildSourceOnly Build the repo as as part of the .NET stack in source-only mode, with no external dependencies.
1717
DotNetSymbolServerTokenMsdl Personal access token for MSDL symbol server. Available from variable group DotNet-Symbol-Server-Pats.
1818
DotNetSymbolServerTokenSymWeb Personal access token for SymWeb symbol server. Available from variable group DotNet-Symbol-Server-Pats.
1919
DotNetSymbolExpirationInDays Symbol expiration time in days (defaults to 10 years).
@@ -76,7 +76,7 @@
7676
Don't do this filtering in non-unified builds to allow repos to define how different build passes are handled
7777
in their own repo-specific builds.
7878
-->
79-
<ItemGroup Condition="'$(DotNetBuildRepo)' == 'true'">
79+
<ItemGroup Condition="'$(DotNetBuild)' == 'true'">
8080
<_ProjectToBuildCurrentBuildPass Include="@(ProjectToBuild->WithMetadataValue('DotNetBuildPass', '$(_DotNetBuildPassNormalized)'))" />
8181
<ProjectToBuild Remove="@(ProjectToBuild)" />
8282
<ProjectToBuild Include="@(_ProjectToBuildCurrentBuildPass)" />
@@ -120,7 +120,7 @@
120120
<_CommonProps Include="VersionsPropsPath=$(VersionsPropsPath)"/>
121121

122122
<!--
123-
When building in source-only or product scenarios, some projects may have set ExcludeFromSourceOnlyBuild or ExcludeFromDotNetBuild to true.
123+
In .NET product build mode, some projects may have set ExcludeFromSourceOnlyBuild or ExcludeFromDotNetBuild to true.
124124
NuGet Restore task reports a warning for such projects, which we suppress here.
125125
-->
126126
<_CommonProps Include="DisableWarnForInvalidRestoreProjects=true" Condition="'$(DotNetBuild)' == 'true'"/>

src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
In VMR copy to local storage, do not push to AzDO.
4141
Define this property before importing repo Publishing.props, to have it control any repo-specific publishing.
4242
-->
43-
<PropertyGroup Condition="'$(DotNetBuildRepo)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true'">
43+
<PropertyGroup Condition="'$(DotNetBuildOrchestrator)' == 'true'">
4444
<PushToLocalStorage>true</PushToLocalStorage>
4545
</PropertyGroup>
4646

@@ -51,7 +51,7 @@
5151
so we want to inclue them here so they can be in the vertical's final manifest.
5252
The VMR tooling to produce the final merged manifest for the VMR build as a whole will filter them out.
5353
-->
54-
<ItemGroup Condition="'$(DotNetBuildRepo)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true'">
54+
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true'">
5555
<ArtifactVisibilityToPublish Include="Vertical;Internal;External" />
5656
</ItemGroup>
5757

@@ -310,7 +310,7 @@
310310
<ShippingPackagesLocalStorageDir Condition="'$(ShippingPackagesLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)packages/shipping</ShippingPackagesLocalStorageDir>
311311

312312
<!-- Directory where nonshipping packages are copied during publishing. -->
313-
<NonShippingPackagesLocalStorageDir Condition="'$(NonShippingPackagesLocalStorageDir)' == ''">$(SourceBuiltShippingPackagesDir)</NonShippingPackagesLocalStorageDir>
313+
<NonShippingPackagesLocalStorageDir Condition="'$(NonShippingPackagesLocalStorageDir)' == ''">$(SourceBuiltNonShippingPackagesDir)</NonShippingPackagesLocalStorageDir>
314314
<NonShippingPackagesLocalStorageDir Condition="'$(NonShippingPackagesLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)packages/nonshipping</NonShippingPackagesLocalStorageDir>
315315

316316
<!-- Directory where asset manifests are copied during publishing. -->
@@ -415,8 +415,8 @@
415415
Text="Visibility 'Vertical' is not supported for shipping artifacts." />
416416
<Error Condition="'@(ItemsToPublishToBlobFeed->WithMetadataValue('IsShipping','true')->AnyHaveMetadataValue('Visibility','Internal'))' == 'true'"
417417
Text="Visibility 'Internal' is not supported for shipping artifacts." />
418-
<Error Condition="'@(ItemsToPublishToBlobFeed->AnyHaveMetadataValue('Visibility','Vertical'))' == 'true' and '$(DotNetBuild)' != 'true'"
419-
Text="Visibility 'Vertical' is only supported in vertical builds." />
418+
<Error Condition="'@(ItemsToPublishToBlobFeed->AnyHaveMetadataValue('Visibility','Vertical'))' == 'true' and '$(DotNetBuildOrchestrator)' != 'true'"
419+
Text="Visibility 'Vertical' is only supported in vertical builds inside the VMR." />
420420

421421
<!--
422422
The user can set `PublishingVersion` via eng\Publishing.props

src/Microsoft.DotNet.Arcade.Sdk/tools/RepoDefaults.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
</PropertyGroup>
1313

1414
<PropertyGroup>
15-
<!-- The DotNetBuild property is set to true if in any kind of .NET product build (orchestrator or repo). -->
16-
<DotNetBuild Condition="'$(DotNetBuildRepo)' == 'true' or '$(DotNetBuildOrchestrator)' == 'true'">true</DotNetBuild>
1715
<!-- TrackPrebuiltUsage is enabled by default when building source-only. -->
18-
<TrackPrebuiltUsage Condition="'$(TrackPrebuiltUsage)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildRepo)' == 'true'">true</TrackPrebuiltUsage>
16+
<TrackPrebuiltUsage Condition="'$(TrackPrebuiltUsage)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuild)' == 'true'">true</TrackPrebuiltUsage>
1917
</PropertyGroup>
2018

2119
</Project>

src/Microsoft.DotNet.Build.Tasks.Feed.Tests/DownloadFileTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class DownloadFileTests
2222
private const string _testSymbolPackage = "test-package-a.1.0.0.symbols.nupkg";
2323

2424
[Fact]
25-
public void DownloadFileAsyncSucceedsForValidUrl_BlobArtifact()
25+
public async Task DownloadFileAsyncSucceedsForValidUrl_BlobArtifact()
2626
{
2727
var buildEngine = new MockBuildEngine();
2828
var publishTask = new PublishArtifactsInManifestV3
@@ -76,7 +76,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_BlobArtifact()
7676
using HttpClient client = FakeHttpClient.WithResponsesGivenUris(fakeHttpResponses);
7777
var path = TestInputs.GetFullPath(Guid.NewGuid().ToString());
7878

79-
var test = publishTask.DownloadFileAsync(
79+
await publishTask.DownloadFileAsync(
8080
client,
8181
PublishArtifactsInManifestBase.BlobArtifactsArtifactName,
8282
_testTextFile,
@@ -90,7 +90,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_BlobArtifact()
9090
}
9191

9292
[Fact]
93-
public void DownloadFileAsyncSucceedsForValidUrl_PipelineArtifact()
93+
public async Task DownloadFileAsyncSucceedsForValidUrl_PipelineArtifact()
9494
{
9595
var buildEngine = new MockBuildEngine();
9696
var publishTask = new PublishArtifactsInManifestV3
@@ -145,7 +145,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_PipelineArtifact()
145145
using HttpClient client = FakeHttpClient.WithResponsesGivenUris(fakeHttpResponses);
146146
var path = TestInputs.GetFullPath(Guid.NewGuid().ToString());
147147

148-
var test = publishTask.DownloadFileAsync(
148+
await publishTask.DownloadFileAsync(
149149
client,
150150
PublishArtifactsInManifestBase.PackageArtifactsArtifactName,
151151
_testTextFile,
@@ -159,7 +159,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_PipelineArtifact()
159159
}
160160

161161
[Fact]
162-
public void DownloadFileAsyncSucceedsForValidUrl_CachedURLHelper()
162+
public async Task DownloadFileAsyncSucceedsForValidUrl_CachedURLHelper()
163163
{
164164
var buildEngine = new MockBuildEngine();
165165
var publishTask = new PublishArtifactsInManifestV3
@@ -222,7 +222,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_CachedURLHelper()
222222
using HttpClient client = FakeHttpClient.WithResponsesGivenUris(fakeHttpResponses);
223223
var path = TestInputs.GetFullPath(Guid.NewGuid().ToString());
224224

225-
var test = publishTask.DownloadFileAsync(
225+
await publishTask.DownloadFileAsync(
226226
client,
227227
PublishArtifactsInManifestBase.PackageArtifactsArtifactName,
228228
_testTextFile,
@@ -232,7 +232,7 @@ public void DownloadFileAsyncSucceedsForValidUrl_CachedURLHelper()
232232

233233
var path2 = TestInputs.GetFullPath(Guid.NewGuid().ToString());
234234

235-
var test2 = publishTask.DownloadFileAsync(
235+
await publishTask.DownloadFileAsync(
236236
client,
237237
PublishArtifactsInManifestBase.PackageArtifactsArtifactName,
238238
"test-package-a.1.0.0.symbols.nupkg",

src/Microsoft.DotNet.Helix/Sdk/AzureDevOpsTask.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ protected string GetEnvironmentVariable(string name)
4444
protected abstract Task ExecuteCoreAsync(HttpClient client);
4545

4646
public override bool Execute()
47+
=> ExecuteAsync().GetAwaiter().GetResult();
48+
49+
private async Task<bool> ExecuteAsync()
4750
{
4851
try
4952
{
@@ -69,7 +72,7 @@ public override bool Execute()
6972
},
7073
})
7174
{
72-
ExecuteCoreAsync(client).GetAwaiter().GetResult();
75+
await ExecuteCoreAsync(client);
7376
}
7477
}
7578
}

src/Microsoft.DotNet.Helix/Sdk/tools/dotnet-cli/DotNetCli.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<IncludeDotNetCli Condition=" '$(IncludeDotNetCli)' != 'true' ">false</IncludeDotNetCli>
6-
<AspNetCoreRuntimeVersion>10.0.0-preview.3.25172.1</AspNetCoreRuntimeVersion>
6+
<AspNetCoreRuntimeVersion>10.0.0-preview.5.25265.106</AspNetCoreRuntimeVersion>
77
<DotNetCliPackageType Condition=" '$(DotNetCliPackageType)' == '' ">runtime</DotNetCliPackageType>
88
<DotNetCliVersion Condition=" '$(DotNetCliVersion)' == '' AND '$(DotNetCliPackageType)' == 'runtime' ">$(BundledNETCoreAppPackageVersion)</DotNetCliVersion>
99
<!-- TODO (https://github.com/dotnet/arcade/issues/7022): We are hardcoding this version to use the one tied to the SDK version from global.json -->

src/SignCheck/Microsoft.SignCheck/Verification/NupkgVerifier.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public override SignatureVerificationResult VerifySignature(string path, string
2323
=> VerifySupportedFileType(path, parent, virtualPath);
2424

2525
protected override bool IsSigned(string path, SignatureVerificationResult svr)
26+
=> IsSignedAsync(path, svr).GetAwaiter().GetResult();
27+
28+
private async Task<bool> IsSignedAsync(string path, SignatureVerificationResult svr)
2629
{
2730
List<ISignatureVerificationProvider> providers = new()
2831
{
@@ -34,9 +37,8 @@ protected override bool IsSigned(string path, SignatureVerificationResult svr)
3437

3538
using (var pr = new PackageArchiveReader(path))
3639
{
37-
Task<VerifySignaturesResult> verifySignatureResult = packageSignatureVerifier.VerifySignaturesAsync(pr, verifierSettings, CancellationToken.None);
38-
39-
return verifySignatureResult.Result.IsValid;
40+
VerifySignaturesResult verifySignatureResult = await packageSignatureVerifier.VerifySignaturesAsync(pr, verifierSettings, CancellationToken.None);
41+
return verifySignatureResult.IsValid;
4042
}
4143
}
4244
}

0 commit comments

Comments
 (0)