Skip to content

cmd/go: document process for tagging and deleting a package from a module #60557

@adonovan

Description

@adonovan

On occasions when we must delete a package from a repo, we would like to provide existing clients some way to continue to use it, even though it will never be updated again. One way to achieve that is to carve out a subdirectory of the repo module as a separate module, tag it with a version, and then delete it from the repo. This way the package is available indefinitely at its latest version even though it no longer exists in the main branch of the repo. This process was used for the cmd/cover tool (see #56783) and the go/pointer package (see #59676), both within the golang.org/x/tools repo.

However, the process requires a sequence of several rather subtle CLs and the creation of many tags (each of which carries a risk of hard-to-fix mistakes). We should document the theory and practice of this approach to make it easier in future, perhaps in https://go.dev/ref/mod, or in the Go wiki.

@bcmills

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions