-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Initial implementation of Command Plugins #3855
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
43e4283
to
e5a5e7d
Compare
adc92c0
to
a1fde8f
Compare
command plugins
@swift-ci please smoke test |
command plugins
a1fde8f
to
461ff3d
Compare
…diagnostics and build command definitions. Adjust call sites accordingly. This further separates out the things that are particular to build tool plugins from those that are common to all plugins.
c23f9b2
to
a69313b
Compare
@swift-ci please smoke test |
…ion for a particular target.
…t all at once at the end (which was always just an interim approach).
@swift-ci please smoke test |
…Command Plugins proposal
@swift-ci please smoke test |
…stub for running tests. Some of the actual code for running tests is currently only in SwiftTestTool.swift, and should be factored out as part of making it callable from a plugin.
@swift-ci please smoke test |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
Merging this after approval and successful CI tests as it is a good baseline for starting to use the feature. Further implementation in upcoming PRs. |
This seems to have regressed the windows build: https://ci-external.swift.org/job/oss-swift-windows-toolchain-x86_64-vs2019/379/console |
Thanks for letting me know, and apologies. It looks to be easy to fix forward. Investigating. |
Command plugins are such an awesome addition, thanks so much for making this happen. I see that in the Remaining in Upcoming PRs sections there is:
Any chance that this will be coming prior to a stable release of Xcode 14? Conflicting plugin command names currently mean that it is impossible to execute either command. |
Filed rdar://99887952 (Support qualifiers for ambiguous plugin commands) |
Initial implementation of https://forums.swift.org/t/pitch-package-manager-command-plugins/53172.
This feature is experimental until approved, so it requires a tools version of 999.0 in the package that declares the command plugin, and requires
SWIFTPM_ENABLE_COMMAND_PLUGINS
to be set to1
in the environment when invoked.This implementation temporarily uses a
swift package plugin <verb>
form for invoking command plugins. Per the pitch and proposal, plugin-defined commands are intended to be invocable using the shortcutswift package <verb>
when the feature is complete (there is discussion of even supportingswift <verb>
but that is not part of the current proposal).Motivation:
Implementation of a new feature being pitched, kept under a feature flag until the proposal is accepted.
Staging:
This feature is being developed incrementally across this PR and follow-on PRs. This PR it is in a state where it could be merged to get most of the functionality into the mainline (behind the feature flag), including all the planned changes to
PackageDescription
andPackagePlugin
. Remaining items of the full feature would then be landed in future PRs. TheSWIFTPM_ENABLE_COMMAND_PLUGINS
guard flag will only be removed once the evolution proposal has been approved and the feature has been fully implemented including any amendments.Modifications:
Remaining in upcoming PRs:
async
to all the plugin APIs (in separate PR, depends on back deployment)