Fix diagnostics not being shown for Swift packages in workspace subfolders#2173
Open
plemarquand wants to merge 11 commits into
Open
Fix diagnostics not being shown for Swift packages in workspace subfolders#2173plemarquand wants to merge 11 commits into
plemarquand wants to merge 11 commits into
Conversation
matthewbastien
approved these changes
Mar 26, 2026
22dde0a to
e42af11
Compare
206a1ba to
e42af11
Compare
…lders Subfolders were not being registered as workspace folders with SourceKit-LSP unless a file from the sub folder was focused when the package was added. Consequently diagnostics requests may never have been produced for files in those packages. Ensure non-root folders are added to subFolderWorkspaces and notified to the language server on creation. Also removes the legacy pre-5.7 single-server codepath that is no longer needed. Issue: swiftlang#2166
7ba66c6 to
e1f7604
Compare
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.
Description
Subfolders were not being registered as workspace folders with SourceKit-LSP unless a file from the sub folder was focused when the package was added. Consequently diagnostics requests may never have been produced for files in those packages.
Refactor LSP creation to add folders to the workspace as they are discovered. Hold back the initial LSP requests for a folder until the
workspace/didChangeWorkspaceFoldersresponse has been received, ensuring the LSP knows about a folder before receiving requests for it.Also removes the legacy pre-5.7 single-server codepath that is no longer needed.
Issue: #2166
Tasks