Skip to content

Expose all target files to SourceKit-LSP #8107

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 6 commits into from
Nov 8, 2024

Conversation

matthewbastien
Copy link
Member

Add resources, ignored, and other files to BuildTarget for use by SourceKit-LSP.

This is tracked by rdar://139431738 as part of swiftlang/vscode-swift#562

Motivation:

SourceKit-LSP needs to be able to determine which target contains a given DocC catalog in order to fulfill documentation related requests. However, the catalog is not listed as one of the sources or headers. Rather, it is part of other files in most cases. Expose all file types to SourceKit-LSP so that it can properly determine which target a given file belongs to.

Modifications:

Added three new properties to BuildTarget: resources, ignored, and other which are arrays of URL pointing to the given file types in the target.

Result:

SourceKit-LSP will be able to see all files contained within a given target.

@MaxDesiatov
Copy link
Contributor

Would you mind adding tests that cover the new APIs?

@MaxDesiatov MaxDesiatov added needs tests This change needs test coverage public API Changes to the public API of SwiftPM labels Nov 7, 2024
@plemarquand
Copy link
Contributor

@swift-ci please test

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@MaxDesiatov MaxDesiatov removed the needs tests This change needs test coverage label Nov 7, 2024
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thank you 👍

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@matthewbastien
Copy link
Member Author

@swift-ci please test

@matthewbastien
Copy link
Member Author

@swift-ci please test windows

@matthewbastien matthewbastien merged commit 42aaad6 into swiftlang:main Nov 8, 2024
5 checks passed
@matthewbastien matthewbastien deleted the sourcekit-lsp-files branch November 8, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
public API Changes to the public API of SwiftPM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants