-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
mark edit/unedit functionality as deprecated #3718
base: main
Are you sure you want to change the base?
Conversation
motivation: edit/unedit functionality was put in place prior to the ability to do local overrides, making it redundant. it also add signfincant complexity to the code which could be good to remove changes: * mark the public edit/unedit API as deprecated * emit deprecation warnin on the edit/unedit CLI commands
@swift-ci please smoke test |
@Argument(help: "The name of the package to edit") | ||
var packageName: String | ||
|
||
func run(_ swiftTool: SwiftTool) throws { | ||
swiftTool.diagnostics.emit(.warning("Editing dependencies can be done via local overrides. 'edit/unedit' are no longer needed and will be deprecated soon.")) |
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.
Maybe there is a better way to describe this? When I search for “swiftpm local overrides”, the first hit is instructions for Xcode, a few hits are instructions to use this edit
command, and the remainder are irrelevant.
Even after searching, I honestly don’t know how to do this on Linux without using edit
.
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.
It's something we're going to implement as part of explicit overrides which are needed for the package registry support.
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.
Probably the warning will have to come once there's a better implementation existing in SwiftPM CLI
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.
this is possible even without the introduction of explicit overrides by pointing the Package.swift to a local path instead of the URL, but I am happy to hold on to this PR to figure out of we want to do the explicit overrides feature first.
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.
Ah, I see — adding a path dependency in your root package. In that case the warning could be added now (I was thinking that this was only an Xcode thing).
motivation: edit/unedit functionality was put in place prior to the ability to do local overrides, making it redundant. it also add signfincant complexity to the code which could be good to remove
changes: