Skip to content

Go module import path is invalid #407

@voxeljorge

Description

@voxeljorge

Go module path mismatch in v4.1.2

Summary

The module at github.com/stackb/rules_proto is tagged as v4.1.2, but the go.mod file declares the module path as:

module github.com/stackb/rules_proto

According to Go’s Semantic Import Versioning rules, any module at major version v2 or higher must include the major version suffix in its module path — for example:

module github.com/stackb/rules_proto/v4

Because of this mismatch, attempting to import the module fails with the following error:

go: github.com/stackb/rules_proto@v4.1.2: invalid version: module contains a go.mod file, so module path must match major version ("github.com/stackb/rules_proto/v4")

Expected Fix

  • Update the module path in go.mod to:
    module github.com/stackb/rules_proto/v4
  • Commit the change and re-tag the release (e.g., v4.1.3).
  • Update internal imports as needed to include /v4.
  • Optionally, retract the incorrect v4.1.2 tag to prevent future import errors.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions