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

x/pkgsite: use pkg.go.dev as source to determine impacts of breaking changes #37135

Open
sylr opened this issue Feb 8, 2020 · 4 comments
Open

x/pkgsite: use pkg.go.dev as source to determine impacts of breaking changes #37135

sylr opened this issue Feb 8, 2020 · 4 comments

Comments

@sylr
Copy link

@sylr sylr commented Feb 8, 2020

Although it seems pkg.go.dev does not provide API for the moment it is something currently discussed according to https://blog.golang.org/pkg.go.dev-2020.

One feature of pkg.go.dev is to track who imports what and that could be useful to determine the consequences of modifying public structs and methods.

If pkg.go.dev could provide an API to list packages which import specified packages, a tool could be written to assert the magnitude of the disruption a series of git commits in a project would provoke in the go eco-system.

Such tool could be part of the go mod toolchain, e.g.:

$ go mod what origin/master..HEAD
Changes from origin/master 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.Struct{...} (modified)
These changes would impact:
  github.com/big-corp/oss-project/pkg/pkg1
  github.com/oss-org/oss-project/v2/pkg/pkg3

Thoughts ?

@gopherbot gopherbot added this to the Unreleased milestone Feb 8, 2020
@gopherbot gopherbot added the pkgsite label Feb 8, 2020
@beoran
Copy link

@beoran beoran commented Feb 8, 2020

This is not a bad idea to asses the status of open source Go code, but let's keep in mind the millions of lines of closed source code in corporations all over the world. It would cause quite a few problems for closed source Go code if a breaking change was made to Go or the standard library just because it doesn't cause problems in open source Go code.

@sylr
Copy link
Author

@sylr sylr commented Feb 8, 2020

Yes you’re absolutely right.

Nonetheless the opensource side of things would already give a good assessment of what would happen.

Also if pkg.go.dev were to be open sourced, this tool could benefit corporations which would have deployed their own instance. That could a great value for a dev to know what his changes in an internal project would means in the entire go source code of his enterprise.

I see this tool as a mean to sensibilise people to adopt the go module versioning by giving them the consequences of not releasing new major versions of their libs when breaking changes happen.

@bcmills
Copy link
Member

@bcmills bcmills commented Feb 10, 2020

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Feb 14, 2020

Also /cc @julieqiu per owners.

@julieqiu julieqiu changed the title go.dev: Use pkg.go.dev as source to determine impacts of breaking changes x/pkgsite: use pkg.go.dev as source to determine impacts of breaking changes Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.