Skip to content

[5.7] Validation of package products should check that a library product doesn't try to include executable targets (#5625) #5629

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

Conversation

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Jun 27, 2022

This is the 5.7 nomination of #5625.

rdar://95782540
(cherry picked from commit 5bd3355)

…uct doesn't try to include executable targets (swiftlang#5625)

Currently a library product that includes an executable target in its `targets` array only results in a warning.  This was the best that could be done before `executableTarget` was introduced, since further checking was needed to see if a `target` was a library or executable target.  Since we have explicit types now, we should promote this to an error since people are running into it and it's not clear what the problem is.

This check is limited to tools version 5.7 or later.  This change includes a new test fixture and unit test.

rdar://95782540
(cherry picked from commit 5bd3355)
@abertelrud abertelrud self-assigned this Jun 27, 2022
@abertelrud abertelrud added the 5.7 label Jun 27, 2022
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Jun 27, 2022
@abertelrud abertelrud merged commit 0402ec1 into swiftlang:release/5.7 Jun 27, 2022
@abertelrud abertelrud deleted the eng/95782540-better-executable-checking-5.7 branch June 27, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants