-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable automatic nuget restore on the client #6676
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b8a3c26
Enable automatic nuget restore on the client
dibarbet 4f20608
Review feedback
dibarbet 19828db
More localization
dibarbet 2325fae
Rename
dibarbet bd05428
Update Roslyn version
dibarbet 407106e
Merge branch 'main' into automatic_nuget_restore
dibarbet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,17 +152,24 @@ export interface NamedPipeInformation { | |
|
||
export interface RestoreParams extends lsp.WorkDoneProgressParams, lsp.PartialResultParams { | ||
/** | ||
* An optional file path to restore. | ||
* If none is specified, the solution (or all loaded projects) are restored. | ||
* The set of projects to restore. | ||
* If none are specified, the solution (or all loaded projects) are restored. | ||
*/ | ||
projectFilePath?: string; | ||
projectFilePaths: string[]; | ||
} | ||
|
||
export interface RestorePartialResult { | ||
stage: string; | ||
message: string; | ||
} | ||
|
||
export interface UnresolvedProjectDependenciesParams { | ||
/** | ||
* The set of projects that have unresolved dependencies and require a restore. | ||
*/ | ||
Comment on lines
+167
to
+169
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might still need a rename or update too since we're also handling other changes. |
||
projectFilePaths: string[]; | ||
} | ||
|
||
export namespace WorkspaceDebugConfigurationRequest { | ||
export const method = 'workspace/debugConfiguration'; | ||
export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; | ||
|
@@ -260,3 +267,9 @@ export namespace RestorableProjects { | |
export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; | ||
export const type = new lsp.RequestType0<string[], void>(method); | ||
} | ||
|
||
export namespace ProjectHasUnresolvedDependenciesRequest { | ||
export const method = 'workspace/_roslyn_projectHasUnresolvedDependencies'; | ||
export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.serverToClient; | ||
export const type = new lsp.RequestType<UnresolvedProjectDependenciesParams, void, void>(method); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a possibility we can now hit this if automatic restore is on? I'm thinking something like the user invokes restore, it starts to restore projects, and tries (but fails) to fully restore one project, call it A. It's still going and marching to restore other projects in the solution, but we saw the restore of A, and then trigger a reload which triggers a check of A's dependencies. We see it's missing, and so we trigger a restore of A again, but the restore of the rest of the solution is still going on...
Should we be queueing these instead in some way? That might also make sense if somebody is invoking two project restores one after the other in rapid succession.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be safe on the reload side because the restores on the client will block the project load queue until they're done. So the reload won't be processed until the rest of the projects finish restoring (I actually hit this issue with the first iteration with notifications)
This should only get hit if someone triggers a manual restore while an automatic one is in progress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah manual and automatic restore happening at once was what worried me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is possible to hit this with a manual restore. I think for now though we don't need a queue - it should be a relatively uncommon case. If its not and ends up being a bad experience for people we can come back and add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dibarbet Maybe this is better to defer anyways until we get all the restores being done by the server rather thant he back-and-forth happening here anyways.