diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index dfd00e46..7e8a502a 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -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 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 1ef11126..6adb0e5d 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -6,7 +6,7 @@
true
2.5.108
- 2.0.149
+ 2.0.152
17.9.28
@@ -36,10 +36,10 @@
-
+
-
+
diff --git a/azure-pipelines/OptProf.yml b/azure-pipelines/OptProf.yml
index 194ca6b6..79520f1d 100644
--- a/azure-pipelines/OptProf.yml
+++ b/azure-pipelines/OptProf.yml
@@ -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
diff --git a/azure-pipelines/apiscan.yml b/azure-pipelines/apiscan.yml
index 73af5259..af78f15c 100644
--- a/azure-pipelines/apiscan.yml
+++ b/azure-pipelines/apiscan.yml
@@ -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'] ]
diff --git a/azure-pipelines/artifacts/VSInsertion.ps1 b/azure-pipelines/artifacts/VSInsertion.ps1
index 54dfc2d6..746ab148 100644
--- a/azure-pipelines/artifacts/VSInsertion.ps1
+++ b/azure-pipelines/artifacts/VSInsertion.ps1
@@ -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
diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml
index 4f77024c..efd2d3a7 100644
--- a/azure-pipelines/dotnet.yml
+++ b/azure-pipelines/dotnet.yml
@@ -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
diff --git a/azure-pipelines/prepare-insertion-stages.yml b/azure-pipelines/prepare-insertion-stages.yml
index 9d37f7d9..996cd30e 100644
--- a/azure-pipelines/prepare-insertion-stages.yml
+++ b/azure-pipelines/prepare-insertion-stages.yml
@@ -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
diff --git a/azure-pipelines/variables/InsertConfigValues.ps1 b/azure-pipelines/variables/InsertConfigValues.ps1
deleted file mode 100644
index d918b647..00000000
--- a/azure-pipelines/variables/InsertConfigValues.ps1
+++ /dev/null
@@ -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))
diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml
index 38528b5e..de81caf9 100644
--- a/azure-pipelines/vs-insertion.yml
+++ b/azure-pipelines/vs-insertion.yml
@@ -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
diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml
index ca2a7a68..4638671c 100644
--- a/azure-pipelines/vs-validation.yml
+++ b/azure-pipelines/vs-validation.yml
@@ -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
diff --git a/test/StreamJsonRpc.Tests/JsonRpcTests.cs b/test/StreamJsonRpc.Tests/JsonRpcTests.cs
index 4a795c5c..216d5a30 100644
--- a/test/StreamJsonRpc.Tests/JsonRpcTests.cs
+++ b/test/StreamJsonRpc.Tests/JsonRpcTests.cs
@@ -2964,14 +2964,19 @@ public abstract class JsonRpcTests : TestBase
/// Asserts that when is set to a unique instance, the deadlock avoidance fails.
///
[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(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(() => 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]