Skip to content
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

Take run destinations into account for SwiftPM build targets #1288

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ahoppen
Copy link
Collaborator

@ahoppen ahoppen commented May 13, 2024

Depends on apple/swift-package-manager#7555

We can have two targets with the same name in a SwiftPM workspace, one for a build target and one for the destination. We need to be able to tell them apart based on the run destination.

@ahoppen ahoppen requested a review from benlangmuir as a code owner May 13, 2024 19:28
@ahoppen ahoppen changed the title Take run destinations into account for SwiftPM build targets 🚥 #swift-package-manager#7555 Take run destinations into account for SwiftPM build targets 🚥 swift-package-manager#7555 May 13, 2024
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 13, 2024

apple/swift-package-manager#7555

@swift-ci Please test

@ahoppen ahoppen changed the title Take run destinations into account for SwiftPM build targets 🚥 swift-package-manager#7555 Take run destinations into account for SwiftPM build targets May 14, 2024
@ahoppen ahoppen force-pushed the background-index-build-plugin branch from 8e73928 to 1841c62 Compare May 14, 2024 18:07
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 14, 2024

@swift-ci Please test

We can have two targets with the same name in a SwiftPM workspace, one for a build target and one for the destination. We need to be able to tell them apart based on the run destination.
This allows us to fix a toolchain when using a `SwiftPMBuildSystem`, which is critical to ensure that a target gets prepared using the same toolchain that is used to index it and that is used for sourcekitd.
@ahoppen ahoppen force-pushed the background-index-build-plugin branch from 1841c62 to 74b1f09 Compare May 14, 2024 22:00
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 14, 2024

@swift-ci Please test

@ahoppen
Copy link
Collaborator Author

ahoppen commented May 14, 2024

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Collaborator Author

ahoppen commented May 14, 2024

@swift-ci Please test Windows

@ahoppen
Copy link
Collaborator Author

ahoppen commented May 15, 2024

Blocked because SwiftPM non-deterministically builds a target for tools or the destination when invoking it using swift build --target MyTarget (rdar://128100158)

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.

None yet

2 participants