Description
When reviewing a number of the Go2 issues, we keep finding that we're basically unable to clean up past mistakes.
On the language side, the go.mod file's "go 1.xxx" declaration lets users declare their expected Go language semantics, which lets us remove Go language features over time, but we have nothing equivalent for removing standard library symbols, short of simply making new major versions of all packages, which gets contagiously invasive very quickly with the dependencies between the std packages. For redesigns, new major versions works, but it doesn't work well for cleanups.
It would be nice to have a mechanism that's similar (but different) to +build go1.x
build tags, but are added implicitly by the caller module module's expected language version.
That'd let a package have different exports depending on who was using it.
Rather than propose an exact solution, this bug is more generally about tracking how (and whether) we can remove things from a package over time.
Metadata
Metadata
Assignees
Type
Projects
Status