cmd/compile: confusing internal error when importing different packages with same name from different paths #25635
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
This is a follow-up on #25568: It is possible to get an internal compiler error when invoking the compiler with plausible but incorrect
-I
arguments leading to selection of different but identically named packages ("io" in this case). To reproduce:cd $GOROOT/test
go tool compile fixedbugs/bug345.dir/io.go
go tool compile -I . fixedbugs/bug345.dir/main.go
=>
The issue here is an incorrect argument for
-I
. The following invocation:go tool compile -I $HOME/test/fixedbugs/bug345.dir fixedbugs/bug345.dir/main.go
works as expected.
The internal error is confusing. We should be able to provide a better error message.
The text was updated successfully, but these errors were encountered: