Merge pull request #1042 from AArnott/libtemplateUpdate

Merge latest Library.Template
This commit is contained in:
Andrew Arnott 2024-05-09 11:35:28 -06:00 коммит произвёл GitHub
Родитель cf1c659c20 3d60c2463b
Коммит 3c6a27f573
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
11 изменённых файлов: 29 добавлений и 40 удалений

Просмотреть файл

@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"powershell": {
"version": "7.4.1",
"version": "7.4.2",
"commands": [
"pwsh"
]
},
"dotnet-coverage": {
"version": "17.10.3",
"version": "17.11.0",
"commands": [
"dotnet-coverage"
]
@ -21,4 +21,4 @@
]
}
}
}
}

Просмотреть файл

@ -6,7 +6,7 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<MessagePackVersion>2.5.108</MessagePackVersion>
<MicroBuildVersion>2.0.149</MicroBuildVersion>
<MicroBuildVersion>2.0.152</MicroBuildVersion>
<VisualStudioThreadingVersion>17.9.28</VisualStudioThreadingVersion>
</PropertyGroup>
<ItemGroup>
@ -36,10 +36,10 @@
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit.combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit.runner.console" Version="2.5.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageVersion Include="xunit.skippablefact" Version="1.4.13" />
<PackageVersion Include="xunit.stafact" Version="1.1.11" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit" Version="2.8.0" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.495" />

Просмотреть файл

@ -75,7 +75,7 @@ stages:
targetType: filePath
filePath: $(Agent.TempDirectory)/Variables-Windows/_pipelines.ps1
- task: NuGetCommand@2
displayName: Push CoreXT packages to VS feed
displayName: Push VS-repo packages to VS feed
inputs:
command: push
packagesToPush: $(Agent.TempDirectory)/VSInsertion-Windows/*.nupkg

Просмотреть файл

@ -14,6 +14,7 @@ jobs:
displayName: 📢 collect apiscan artifact
targetPath: $(Pipeline.Workspace)/.gdn/.r/apiscan/001/Logs
artifactName: apiscan-logs
condition: succeededOrFailed()
variables:
- name: SymbolsFeatureName
value: $[ dependencies.Windows.outputs['SetPipelineVariables.SymbolsFeatureName'] ]

Просмотреть файл

@ -28,7 +28,7 @@ $result = @{
}
if ($env:IsOptProf) {
$CoreXTPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/CoreXT"
$VSRepoPackages = "$RepoRoot/bin/Packages/$BuildConfiguration/VSRepo"
$ArtifactBasePath = "$RepoRoot\obj\_artifacts"
$ArtifactPath = "$ArtifactBasePath\VSInsertion"
@ -47,12 +47,12 @@ if ($env:IsOptProf) {
# ultimately resulting in a failure of the optprof run.
$InsertionMetadataVersion += '.' + $env:BUILD_BUILDID
}
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $CoreXTPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
& (& "$PSScriptRoot\..\Get-NuGetTool.ps1") pack "$PSScriptRoot\..\InsertionMetadataPackage.nuspec" -OutputDirectory $VSRepoPackages -BasePath $ArtifactPath -Version $InsertionMetadataVersion | Out-Null
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$result["$CoreXTPackages"] = (Get-ChildItem "$CoreXTPackages\StreamJsonRpc.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
$result["$VSRepoPackages"] = (Get-ChildItem "$VSRepoPackages\StreamJsonRpc.VSInsertionMetadata.$InsertionMetadataVersion.nupkg");
}
$result

Просмотреть файл

@ -27,7 +27,7 @@ steps:
condition: and(succeeded(), ne(variables['OptProf'], 'true'))
- ${{ if parameters.IsOptProf }}:
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertConfigValues.ps1 to notice.
# We have to artifically run this script so that the extra .nupkg is produced for variables/InsertPropsValues.ps1 to notice.
- powershell: azure-pipelines\artifacts\VSInsertion.ps1
displayName: 🔧 Prepare VSInsertion artifact

Просмотреть файл

@ -25,13 +25,12 @@ stages:
- download: current
artifact: symbols-legacy
displayName: 🔻 Download symbols-legacy artifact
- task: MicroBuildArchiveSymbols@4
- task: MicroBuildArchiveSymbols@5
displayName: 🔣 Archive symbols to Symweb
inputs:
SymbolsFeatureName: $(SymbolsFeatureName)
SymbolsProject: VS
SymbolsAgentPath: $(Pipeline.Workspace)/symbols-legacy
azureSubscription: Symbols Upload (DevDiv)
- ${{ if true }}: # leave the condition to avoid merge conflicts later.
- job: push

Просмотреть файл

@ -1,20 +0,0 @@
$BuildConfiguration = $env:BUILDCONFIGURATION
if (!$BuildConfiguration) {
$BuildConfiguration = 'Debug'
}
$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin\Packages\$BuildConfiguration")
$dirsToSearch = "$BinPath\NuGet\*.nupkg" |? { Test-Path $_ }
$icv=@()
if ($dirsToSearch) {
Get-ChildItem -Path $dirsToSearch |% {
if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") {
$id = $Matches[1]
$version = $Matches[2]
$icv += "$id=$version"
}
}
}
Write-Output ([string]::join(',',$icv))

Просмотреть файл

@ -41,7 +41,7 @@ extends:
artifact: VSInsertion-Windows
displayName: 🔻 Download VSInsertion-Windows artifact
- task: 1ES.PublishNuget@1
displayName: 📦 Push CoreXT packages to VS feed
displayName: 📦 Push VS-repo packages to VS feed
inputs:
packagesToPush: '$(Pipeline.Workspace)/CI/VSInsertion-Windows/*.nupkg'
packageParentPath: $(Pipeline.Workspace)/CI/VSInsertion-Windows

Просмотреть файл

@ -62,7 +62,7 @@ extends:
artifact: VSInsertion-Windows
displayName: 🔻 Download VSInsertion-Windows artifact
- task: 1ES.PublishNuget@1
displayName: 📦 Push CoreXT packages to VS feed
displayName: 📦 Push VS-repo packages to VS feed
inputs:
packagesToPush: '$(Pipeline.Workspace)/VSInsertion-Windows/*.nupkg'
packageParentPath: $(Pipeline.Workspace)/VSInsertion-Windows

Просмотреть файл

@ -2964,14 +2964,19 @@ public abstract class JsonRpcTests : TestBase
/// Asserts that when <see cref="JsonRpc.JoinableTaskTracker"/> is set to a unique instance, the deadlock avoidance fails.
/// </summary>
[UIFact]
public void JoinableTaskFactory_IntegrationClientSideOnly_ManyConnections_UniqueTrackerLeadsToDeadlock()
public async Task JoinableTaskFactory_IntegrationClientSideOnly_ManyConnections_UniqueTrackerLeadsToDeadlock()
{
// Set up a main thread and JoinableTaskContext.
JoinableTaskContext jtc = new();
// Track our async work so our test doesn't exit before our UI thread requests do,
// or the test process will crash.
JoinableTaskCollection jtCollection = jtc.CreateCollection();
JoinableTaskFactory jtf = jtc.CreateFactory(jtCollection);
// Configure the client (only) to understand JTF.
this.clientRpc.AllowModificationWhileListening = true;
this.clientRpc.JoinableTaskFactory = jtc.Factory;
this.clientRpc.JoinableTaskFactory = jtf;
// Set up the alternate JsonRpc connection.
var streams = Nerdbank.FullDuplexStream.CreateStreams();
@ -2984,7 +2989,7 @@ public abstract class JsonRpcTests : TestBase
out IJsonRpcMessageHandler alternateClientHandler,
controlledFlushingClient: false);
JsonRpc alternateServerRpc = new(alternateServerHandler, this.server) { JoinableTaskTracker = new() };
JsonRpc alternateClientRpc = new(alternateClientHandler) { JoinableTaskFactory = jtc.Factory };
JsonRpc alternateClientRpc = new(alternateClientHandler) { JoinableTaskFactory = jtf };
this.server.AlternateRpc = alternateServerRpc;
alternateServerRpc.TraceSource = new TraceSource("ALT Server", SourceLevels.Verbose | SourceLevels.ActivityTracing);
@ -2997,16 +3002,20 @@ public abstract class JsonRpcTests : TestBase
const string CallbackMethodName = "ClientNeedsMainThread";
alternateClientRpc.AddLocalRpcMethod(CallbackMethodName, new Func<Task>(async delegate
{
await jtc.Factory.SwitchToMainThreadAsync();
await jtf.SwitchToMainThreadAsync();
}));
alternateServerRpc.StartListening();
alternateClientRpc.StartListening();
jtc.Factory.Run(async delegate
jtf.Run(async delegate
{
await Assert.ThrowsAsync<OperationCanceledException>(() => this.clientRpc.InvokeWithCancellationAsync(nameof(this.server.CallbackOnAnotherConnection), new object?[] { CallbackMethodName }, this.TimeoutToken).WithCancellation(ExpectedTimeoutToken));
});
// Drain any UI thread requests before exiting the test.
await jtCollection.JoinTillEmptyAsync();
await Task.Yield();
}
[Fact]