Skip to content

x/pkgsite: warn if a module regularly breaks semver #43846

@mvdan

Description

@mvdan

On the right side of the module page there are checkmarks like "stable version" and "redistributable license". I think we should also add a checkmark along the lines of "follows semver". That is, that minor or bugfix versions don't repeatedly make clearly backwards-incompatible changes, like removing entire functions or packages.

Here's an example of such an obvious breakage: https://pkg.go.dev/google.golang.org/grpc/naming

That page does show a This package is not in the latest version of its module warning, but one would usually not find such a warning until after experiencing breakage when updating the module and finding build failures due to the now-missing package.

In other words, if I'm looking at what modules to add as dependencies and I looked at https://pkg.go.dev/google.golang.org/grpc, I'd think twice before adding that module if I saw an alert saying one of the following:

  • Last breaking change on date (or the version)
  • N v1 releases contain breaking changes (or N% of stable v1 releases)
  • N packages have had breaking changes since v1.0.0 (or N% of total packages)

Please realise that I'm only using grpc as an example since it's the one I've struggled with the most recently. The feature would equally apply to any other v1+ module which uses stable semver tags, but which actively breaks the semver compatibility rules.

cc @bcmills @heschik @julieqiu @leitzler

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.modulespkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions