Skip to content

Conversation

abertelrud
Copy link
Contributor

This is a SwiftPM 5.9 nomination of #6446 and it's follow-on fix #6451.

Motivation

Package plugins can be applied to packages in Xcode without any modification. But Xcode also has an additional XcodeProjectPlugin module that provides extra API for applying plugins to Xcode projects. Since this is a common use case, it makes sense for newly created plugins to have conditional use of that extra API by default. If there is support for applying plugins to the project formats of other IDEs in the future, it would make sense to add those to the templates as well.

This support is currently always added but we could consider having options in the API for whether to add it.

Modifications

  • extended the template-generated source code
  • added to the unit tests

rdar://108166582

…ional support for XcodeProjectPlugin (swiftlang#6446)

Many package plugins are used from Xcode, so it makes sense for newly created ones to have that by default.  If there is support for other IDEs in the future, it would make sense to add that as well.

This support is currently always added but we could consider having options in the API for whether to add it.

rdar://108166582
(cherry picked from commit f0eae33)
…ate (swiftlang#6451)

This is a supplemental fix for swiftlang#6446 that removes the `async` specifier and corrects the protocol conformance of the Xcode command plug-in.  This change should have been part of that PR.

- remove the `async` specifier since the entry point that XcodeProjectPlugin defines isn't async
- correct the protocol conformance of the Xcode command plug-in
- update the unit tests

rdar://108166582
(cherry picked from commit 87ecb5d)
@abertelrud abertelrud self-assigned this Apr 19, 2023
@abertelrud abertelrud added the swift 5.9 This PR targets the 5.9 branch label Apr 19, 2023
@abertelrud
Copy link
Contributor Author

@swift-ci smoke test

@abertelrud abertelrud changed the title Newly created build tool and command plugin templates should have conditional support for XcodeProjectPlugin #6446 [5.9] Newly created build tool and command plugin templates should have conditional support for XcodeProjectPlugin #6446 Apr 19, 2023
@abertelrud abertelrud enabled auto-merge (squash) April 19, 2023 16:40
@abertelrud abertelrud merged commit 2cd23b2 into swiftlang:release/5.9 Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 5.9 This PR targets the 5.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants