-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: unexpected error about conflicting package heights #25568
Comments
@griesemer, could you give me some hint, if this looks like a bug in a compiler or rather wrong usage of the compiler? |
This is a bug triggered by https://go-review.googlesource.com/c/go/+/106797. I thought there was an existing issue filed for it, but I'm not finding one. |
@neild thanks for pointing to that. adding "-iexport=false" affects the problem but does not "fixes" it at all. Since the rest of stdlib was compiled with -iexport=true, the tested package cannot be compiled. I am a little lost here now. Not sure if that is a bug that should be fixed.. ping @mdempsky |
@ysmolsky This is a bug if it appears when all involved source is compiled with the latest compiler version (tip) - which I assume is the case. |
Yes, if I run the same sequence of commands with the commit prior CL 106797 I see the desired output from the compiler:
I have verified that bisecting leads to CL 106797 as a bad commit |
@ysmolsky I can reproduce it but as is this is not a bug after all: You are providing additional compiler flags (-D, -I) and they are set relative to the current (test) directory. For one, it doesn't appear that those paths can be relative (at least it doesn't work for me) though that is unrelated: In your command line you're not providing the correct path for -D. Furthermore, you don't need -I here. (You also don't need -D if you do everything in bug345.dir). That is, what happens is that you don't get the correct "io" packages here. I get correct behavior if I choose one of two options: A) Do everything in the local directory:
B) Do everything in the go/test directory, without or with correct -D argument:
Or provide a -D as in: Thus I think this is working as intended. (Feel free to re-open if you disagree.) |
PS: That said, perhaps the compiler should exit with a better error message rather than an internal compiler error. I filed #25635 as a follow-up . |
@griesemer thank you for insights. I will try to convert a go test avoiding triggering this panic error. |
While trying to remove use of perl from test/fixedbugs/bug345.go, I have encountered following behaviour about conflicting package heights.
https://github.com/golang/go/blob/master/test/fixedbugs/bug345.dir/io.go
https://github.com/golang/go/blob/master/test/fixedbugs/bug345.dir/main.go
I am not sure if it's a bug or expected feature.
What version of Go are you using (
go version
)?The text was updated successfully, but these errors were encountered: