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
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,14 @@ public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(CancellationToken canc

[Obsolete]
public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(ImmutableArray<string> runningProjects, CancellationToken cancellationToken)
=> throw new NotImplementedException();
{
// StreamJsonRpc may use this overload when the method is invoked with empty parameters. Call the new implementation instead.

if (!runningProjects.IsEmpty)
throw new NotImplementedException();

return GetUpdatesAsync(ImmutableArray<RunningProjectInfo>.Empty, cancellationToken);
}

public async ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(ImmutableArray<RunningProjectInfo> runningProjects, CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(CancellationToken canc

[Obsolete]
public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(ImmutableArray<string> runningProjects, CancellationToken cancellationToken)
=> throw new NotImplementedException();
{
// StreamJsonRpc may use this overload when the method is invoked with empty parameters. Call the new implementation instead.

if (!runningProjects.IsEmpty)
throw new NotImplementedException();

return GetUpdatesAsync(ImmutableArray<RunningProjectInfo>.Empty, cancellationToken);
}

public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(ImmutableArray<RunningProjectInfo> runningProjects, CancellationToken cancellationToken)
=> service.GetUpdatesAsync(runningProjects, cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ await localWorkspace.ChangeSolutionAsync(localWorkspace.CurrentSolution

Assert.True(sessionState.IsSessionActive);

#pragma warning disable CS0612 // Type or member is obsolete
// validate that obsolete overload does not throw for empty array:
_ = await localService.GetUpdatesAsync(runningProjects: ImmutableArray<string>.Empty, CancellationToken.None);
Assert.Equal(++observedDiagnosticVersion, diagnosticRefresher.GlobalStateVersion);
#pragma warning restore

if (commitChanges)
{
// CommitUpdatesAsync
Expand Down
Loading