Skip to content

cmd/go: Proposal: Modules without releases have the newest code fetched when go get -u is ran. #33722

Closed
@integrii

Description

@integrii

Currently modules that have no releases do not fetch the latest code, even when go get -u is run. Essentially there is a user-hostile edge-case in go get workflow:

If the dependency has releases, then use go get -u, else use go get module/path@master

The code that was present on the first go get of the module is still used until a new release is cut and go get -u is run. It is possible to manually update the module without a release by doing go get module/path@master, but I think it would make sense to see this behavior be the default for modules without releases.

Steps to reproduce

  • Create a repository and init a module for it
  • Do not cut a release of this repository
  • Use unreleased module and repository as a dependency in another program
  • Update the unreleased module's code
  • Try to go get -u the unreleased module from your other program
  • Notice that the build does not contain the newest code from the unreleased module

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions