Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand All @@ -21,4 +21,4 @@
]
}
}
}
}
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/OptProf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines/apiscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'] ]
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines/artifacts/VSInsertion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
2 changes: 1 addition & 1 deletion azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions azure-pipelines/prepare-insertion-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions azure-pipelines/variables/InsertConfigValues.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion azure-pipelines/vs-insertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/vs-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 14 additions & 5 deletions test/StreamJsonRpc.Tests/JsonRpcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2964,14 +2964,19 @@ public void JoinableTaskFactory_IntegrationClientSideOnly_ManyConnections()
/// 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();
Expand All @@ -2984,7 +2989,7 @@ public void JoinableTaskFactory_IntegrationClientSideOnly_ManyConnections_Unique
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);
Expand All @@ -2997,16 +3002,20 @@ public void JoinableTaskFactory_IntegrationClientSideOnly_ManyConnections_Unique
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]
Expand Down