Radar · Go · Archive · Week 19 · May 4 – 10, 2026
go/importer: clarification of ForCompiler lookup parameter
Nice to knowecosystem
- What changed
- Documentation of the lookup parameter of
ForCompilercan be clarified to correct a parsing bug that caused unintended deprecation. - Production impact
- The source does not say.
- Try it
- Run
go doc go/importer.ForCompilerand verify that the documentation now reflects the intended behavior. - Source
- github.com/golang/go/issues/79139
Understand it, then run it
The ForCompiler function in the go/importer package lets you load Go packages by name, using the compiler’s view of the source tree. A recent change clarified the documentation for its lookup argument. Previously the docs were ambiguous and a parsing bug caused the function to be marked as deprecated in Go 1.16, even though it was still fully usable. The clarification removes that confusion and restores the function’s normal status.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed