-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
API change breaks github.com/codegangsta/cli #507
Comments
Hi @alienscience, This was indeed a change to the API, we aim to follow semantic versioning (as noted here: https://github.com/urfave/cli/blob/master/CHANGELOG.md), but it occurs to me that this could also be called out in the README for clarity. This change was made in v1.15.0 (https://github.com/urfave/cli/blob/master/CHANGELOG.md#1150---2016-04-30) Let me know if this answers your question! |
If you follow semantic versioning you should update the major version when you break the API: I would expect the new version to be 2.x.x and the existing version to still work. It is disappointing that the API changes and the library blames the application writer by writing a message to the user. It used to be good practice in Go libraries to change the URL when the API changes - I know a lot of libraries don't bother with this anymore which is why I asked if this sort of chaos is acceptable now? |
In this case, it was an API deprecation rather than a breakage which is allowed during minor version bumps (see http://semver.org/#spec-item-7). I agree that having the library out the deprecation notice at runtime is undesirable for the end user of the application (and may even be considered an API breakage under certain lights). I'll see about removing it and just deprecating via the documentation. With regards to the Go ecosystem as a whole: I've seen a mixture of approaches, but it seems like using semantic versioning and expecting the user to vendor is not out of the ordinary. Thanks for bringing this up! |
Instead use deprecation pattern described in https://blog.golang.org/godoc-documenting-go-code. Fixes #507
DEPRECATED Action signature. Must be
cli.ActionFunc
. This is an error in the application.Is it really an application error or did someone make a breaking change to the API without changing the URL? Is this considered an OK thing to do now?
I am using the import 'github.com/codegangsta/cli'
The text was updated successfully, but these errors were encountered: