Skip to content

Return fileHandlingCapability.handled for all files that SwiftPMBuildSystem has build settings for #1232

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 1 commit into from
May 8, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 7, 2024

Previously, SwiftPMBuildSystem would report .unhandled as the file handling capability for Package.swift. In single workspace-folder setups, this was not an issue because we would always default to using the build system of the first/only workspace folder, which was the only SwiftPMBuildSystem and then returned compiler arguments despite saying that it couldn’t handle Package.swift.

This, however, breaks if you have a setup with multi workspace folders, where we can’t rely on the first workspace folder being able to provide build settings for the package manifest.

To fix this, report .handled file handling capability for all files that SwiftPMBuildSystem can compute build settings for.

Fixes #1210
rdar://127351614

…ildSystem` has build settings for

Previously, `SwiftPMBuildSystem` would report `.unhandled` as the file handling capability for `Package.swift`. In single workspace-folder setups, this was not an issue because we would always default to using the build system of the first/only workspace folder, which was the only `SwiftPMBuildSystem` and then returned compiler arguments despite saying that it couldn’t handle `Package.swift`.

This, however, breaks if you have a setup with multi workspace folders, where we can’t rely on the first workspace folder being able to provide build settings for the package manifest.

To fix this, report `.handled` file handling capability for all files that `SwiftPMBuildSystem` can compute build settings for.

Fixes swiftlang#1210
rdar://127351614
@ahoppen ahoppen requested a review from bnbarham May 7, 2024 01:30
@ahoppen ahoppen requested a review from benlangmuir as a code owner May 7, 2024 01:30
@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit fb30a2f into swiftlang:main May 8, 2024
3 checks passed
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.

Symbol completion for Package.swift from SwiftPM project in a subfolder doesn't work
2 participants