-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
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.