Skip to content

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

Closed as not planned
@sylr

Description

@sylr

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions