x/tools/go/packages: Load(&cfg...) modifies cfg, contra explicit documentation #67702
Labels
Documentation
Issues describing a change to documentation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
The Load function claims not to mutate the Config, but it does in fact mutate the non-exported fields, and has done for some time. In https://go.dev/cl588936 I proposed to update the docs to match reality:
but perhaps we should instead reestablish the invariant rather than give it up.
@findleyr @matloob
The text was updated successfully, but these errors were encountered: