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
Newly created build tool and command plugin templates should have conditional support for XcodeProjectPlugin #6446
Newly created build tool and command plugin templates should have conditional support for XcodeProjectPlugin #6446
Conversation
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I think this naturally poses the question why we don't have the simpler func createBuildCommand(for inputPath: Path, in outputDirectoryPath: Path, with generatorToolPath: Path) -> Command?
as an API, but that shouldn't prevent us from improving the template.
Absolutely. There are a lot of refinements that can be made to the API, and it would still be interesting to see if there could be some kind of über-API that would be generic enough to cover most conceivable IDEs. That approach didn't seem possible for the general case given the differences between the data models of Xcode and Swift Package Manager, but for the common case of just wanting to create a command for every file of some type, it seems a shame to have to have the Xcode specialization. |
…ional support for XcodeProjectPlugin 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
Thanks @MaxDesiatov those newlines were a mistake. I'll fix that. |
bb96497
to
e4ef6b3
Compare
@swift-ci please smoke test |
@swift-ci please test windows platform |
This is a supplemental fix for apple#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
…ate (#6451) This is a supplemental fix for #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
…ional support for XcodeProjectPlugin (apple#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 (apple#6451) This is a supplemental fix for apple#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)
…ve conditional support for XcodeProjectPlugin #6446 (#6456) * New build tool plugin and command plugin templates should have conditional support for XcodeProjectPlugin (#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) * Supplemental fix for XcodeProjectPlugin support in package init template (#6451) This is a supplemental fix for #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)
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.
Changes:
rdar://108166582