Skip to content
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

Closed
alienscience opened this issue Aug 16, 2016 · 3 comments
Closed

API change breaks github.com/codegangsta/cli #507

alienscience opened this issue Aug 16, 2016 · 3 comments

Comments

@alienscience
Copy link

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'

@jszwedko
Copy link
Contributor

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!

@alienscience
Copy link
Author

If you follow semantic versioning you should update the major version when you break the API:

http://semver.org/

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?

@jszwedko
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants