-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: <autogenerated>:1: symbol listed multiple times for same type across multiple packages #31252
Comments
Could you outline exact steps to reproduce the failure? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@Abner-Xu that repository isn't available publicly. Please outline exact steps to take to recreate the problem. |
@andybons Please use this repositories |
This seems to be a regression from 1.11. If the same type name is declared in multiple packages, it throws this error. |
git bisect points to 13baf4b @randall77 If I added But if disable inlining via |
I have a fix. |
Change https://golang.org/cl/171464 mentions this issue: |
@gopherbot please open a backport to 1.11. |
Backport issue(s) opened: #31396 (for 1.11). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Two places in CL are where I found when trying to fix this, but it's not clear to me what the different between |
@gopherbot please open a backport to 1.12. |
@cuonglm Yes, it's pretty cryptic. This part of the compiler really needs better documentation. It confuses me every time I look at it also... |
@randall77 sorry, you'll have to open a backport bug for 1.12 yourself (if you haven't already). This is a known bug. |
Both types.Sym and obj.LSym have the field Name, and that field is widely used in compiler source. It can lead to confusion that when to use which one. So, adding documentation for clarifying the difference between them, eliminate the confusion, or at least, make the code which use them clearer for the reader. See #31252 (comment) Change-Id: I31f7fc6e4de4cf68f67ab2e3a385a7f451c796f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/175019 Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
Different packages and same struct function compile error
env
go version go1.12.1 windows/amd64
description
this problem happeded in version go1.12, my test in version go1.11 is ok. I think this is compile bug.
this file struct is very common in WEB MVC mode.
error
dirTree
code
main
router
admin-IndexController
home-IndexController
The text was updated successfully, but these errors were encountered: