Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: module replacements have confusing (lack of) aliasing for package-level state #26607
If I replace two different modules with the same replacement (say, because I'm planning to merge a fork back into the original package), I expect the two import paths to actually refer to the same package, including the same package state.
However, that is currently not the case: instead, the program receives two distinct copies of the module that do not share state.
(It may be that my expectations are off, but if so, we should clarify the documentation.)
Per in-person discussion with @rsc, perhaps for now we should require that the