fix(4019): skip unloaded projects during file rename#4028
Draft
dcsid wants to merge 2 commits into
Draft
Conversation
Author
|
@microsoft-github-policy-service agree |
Member
|
Are we going to miss rename locations in any unloaded programs? In other words, should we be loading the programs on the fly? If not, whose responsibility is it to do that? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #4019
Skip projects without loaded programs when collecting language services for
workspace/willRenameFiles. After a watched file rename in a composite project, the session can include a solution/config project whose program is not loaded; constructing a file-rename language service for that project caused a nil pointer panic atprogram.Options().This keeps file rename edits scoped to projects that actually have loaded programs, matching the expectations of
LanguageService.Adds an LSP regression test covering the composite-project rename +
workspace/didChangeWatchedFilesscenario from the issue.Testing
npx hereby all-checksAI Assistance
This PR was authored with AI assistance. I reviewed and understand the changes and will respond to review feedback.