-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Commands] swift package migrate
command
#8613
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
I'm going to add more tests once we actually get a toolchain that supports all the new functionality. |
@swift-ci please test |
Just so I understand this correctly, the flow is:
Right? |
@jakepetroules Yes, that is correct. |
0f5bf84
to
3cd5d46
Compare
@swift-ci please test Linux platform |
On thing I forgot to mention - we need to implement category filtering as part of SwiftFixIt still and only apply fix-its related to the selected features. I am planning to do that in a follow-up. |
@swift-ci please test |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
@dschaefer2, we have decided to make it a sub-command of package instead, so I'll have to make some changes here but the functionally everything is going to stay the same. |
3cd5d46
to
9f3ba67
Compare
@swift-ci please test |
@swift-ci please test Windows platform |
9f3ba67
to
d8b18e5
Compare
@swift-ci please test |
d8b18e5
to
e53cfc2
Compare
@swift-ci please test |
@swift-ci please test Windows platform |
@swift-ci please test |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
52fbc59
to
cad003f
Compare
@swift-ci please test Windows platform |
3 similar comments
@swift-ci please test Windows platform |
@swift-ci please test Windows platform |
@swift-ci please test Windows platform |
… the Swift compiler
…it could be shared with other commands
This would make it possible to access diagnostic files through a generic build system interface.
`swift migrate` could be used to migrate whole package or its individual targets to use the given feature(s) that support migration mode.
cad003f
to
ac92a49
Compare
@swift-ci please test Windows platform |
@swift-ci please test Linux platform |
@swift-ci please test macOS platform |
@swift-ci please test |
@swift-ci please test Windows platform |
swift migrate
commandswift package migrate
command
Motivation:
swift package migrate
could be used to migrate whole package or its individual targets to use the given feature(s) that support migration mode. This is paired with Swift compiler changes to add:migrate
mode to upcoming/experimental features.Modifications:
UserToolchain
gained an ability to list features supported by the Swift compiler.add-setting
package command has been slightly refactored to allow use of manifest modification logic without having to call the command itself.ModuleBuildDescription
protocol can now list diagnostic filesSwiftFixIt
API to apply fix-its andAddSwiftSetting
API to enable features.Result:
SwiftPM gained a new command
swift package migrate --targets <target,...> --to-feature <feature> [--to-feature <...>]