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

Add command which displays API breakages #60

Open
3 tasks
sylr opened this issue Feb 29, 2020 · 0 comments
Open
3 tasks

Add command which displays API breakages #60

sylr opened this issue Feb 29, 2020 · 0 comments
Labels
feature request New feature or request

Comments

@sylr
Copy link

sylr commented Feb 29, 2020

Feature request

Checklist

  • The feature / improvement you are suggesting overlaps with the purpose of gomod:
    facilitating the management of Go modules and their dependencies.
  • You have examined various alternatives to the new feature / improvement you are suggesting
    and are describing the results in the description below.
  • You have filled in the three sections below and deleted their corresponding placeholders
    texts.

Description

I suggested in a golang/go issue that go mod could use pkg.go.dev as source to assert the magnitude of breakages a series a commit in a project would have golang/go#37135

I believe that part of this could be implemented in https://github.com/Helcaraxan/gomod

Implementation suggestions

A what(?) command which would take a git commit range as input and would display all signatures changes:

$ gomod what v0.0.2..HEAD
Changes from v0.0.2 to HEAD modified following exported signatures:
  github.com/org/go-lib/pkg/pkg1.New(...) (modified)
  github.com/org/go-lib/pkg/pkg2.NewWithContext(...) (deleted)
  github.com/org/go-lib/pkg/pkg2.NewWithBackgroundContext(...) (added)
  github.com/org/go-lib/pkg/pkg2.Struct{...} (modified)
$ gomod what v0.0.2..HEAD --exit-code
# exit 0 if no breaking changes
# exit 1 if changes imply a new Minor version (only added signatures)
# exit 2 if changes imply a new Major version (any changes or deleted signatures)
@sylr sylr added the feature request New feature or request label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant