Skip to content

Conversation

@tmat
Copy link
Member

@tmat tmat commented Nov 12, 2024

Implements IManagedHotReloadLanguageService2 interface that allows the debugger to restart a subset of processes when a rude edit is encountered instead of terminating the entire debugging session.

This includes a new overload of GetUpdatesAsync that takes a list of running projects and returns sets of projects to restart and to rebuild based on dependency analysis of updated projects. This functionality has already been exposed to dotnet-watch, now it will be available to VS debugger as well.

Adds a new API UpdateBaselines that discards the initial baselines of specified projects and commits the current solution snapshot. This is to be called when projects affected by rude edits are rebuilt. The next update will start with a new baseline read from newly built metadata.

@ghost ghost added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 12, 2024
@tmat tmat marked this pull request as ready for review November 13, 2024 01:42
@tmat tmat requested review from a team as code owners November 13, 2024 01:42
@tmat tmat requested a review from a team as a code owner November 13, 2024 02:54
@tmat tmat changed the title Debugger update [EnC] Implement support for restarting subset of projects affected by rude edits Nov 13, 2024
@tmat
Copy link
Member Author

tmat commented Nov 13, 2024

@davidwengier ptal

public async ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(CancellationToken cancellationToken)
[Obsolete]
public ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(CancellationToken cancellationToken)
=> GetUpdatesAsync(runningProjects: [], cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean things are broken until the debugger respond? Would it be better to pass all something like currentCompileTimeSolution.Projects.Select(p=>p.FilePath) as the first parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, shouldn't be broken. The debugger doesn't currently consume the results that are affected by this input.

@tmat tmat merged commit e75664f into dotnet:main Nov 13, 2024
28 checks passed
@tmat tmat deleted the DebuggerUpdate branch November 13, 2024 23:54
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 13, 2024
@jjonescz jjonescz modified the milestones: Next, 17.13 P2 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants