Skip to content

Ensure document symbols are provided for folders in multi root workspaces #1668

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

Merged
merged 3 commits into from
Jul 2, 2025

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Jun 30, 2025

If the user is working in a multi root workspace document symbols would not be provided if they were for any folder except the first one added. This also prevented the test explorer from properly initializing.

Check to see if the folder being added is in the list of VS Code workspace folders and associate the folder with the onDocumentSymbols request from the LSP.

Issue: #1669

@plemarquand plemarquand force-pushed the test-modification-tests branch 4 times, most recently from 7c08d62 to c025d41 Compare June 30, 2025 15:15
@plemarquand plemarquand changed the title [WIP] - Debug test modification tests Ensure folders are added to sourcekit-lsp in multi root workspaces Jun 30, 2025
@plemarquand plemarquand force-pushed the test-modification-tests branch 2 times, most recently from d498a45 to 5a2a80b Compare June 30, 2025 18:40
@plemarquand plemarquand changed the title Ensure folders are added to sourcekit-lsp in multi root workspaces Ensure document symbols are provided for folders in multi root workspaces Jun 30, 2025
@plemarquand plemarquand force-pushed the test-modification-tests branch 2 times, most recently from 57a2ec2 to a315ca3 Compare June 30, 2025 19:20
@plemarquand plemarquand marked this pull request as ready for review June 30, 2025 19:49
`addFolder` in the LSP client was checking to see if the folder being
added was a root folder.

If the user is working in a multi root workspace document symbols would
not be provided if they were for any folder except the first one added.
This also prevented the test explorer from properly initializing.

Check to see if the folder being added is in the list of VS Code
workspace folders and associate the folder with the onDocumentSymbols
request from the LSP.

Issue: swiftlang#1669
@plemarquand plemarquand force-pushed the test-modification-tests branch from a315ca3 to f95c1e9 Compare June 30, 2025 20:04
@award999
Copy link
Contributor

award999 commented Jul 2, 2025

Is there a reason the code-workspace test run missed this, i.e. need for new/modified tests?

@plemarquand
Copy link
Contributor Author

There were no tests covering modification (textDocument/tests LSP req), only finding tests on workspace open (workspace/tests). I've added some new tests in this patch.

Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

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

Missing CHNAGELOG entry

@plemarquand plemarquand merged commit c3abc77 into swiftlang:main Jul 2, 2025
93 of 108 checks passed
@plemarquand plemarquand deleted the test-modification-tests branch July 2, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants