-
Notifications
You must be signed in to change notification settings - Fork 18k
go vet panics with "inconsistent import: var time.UTC *time.Location previously imported as: var UTC *time.Location" #16680
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
Comments
Dup of #16112 and several others. Caused by out-of-date .o files, |
Thanks @ALTree! I'll close it. |
It seems weird to me that this issue has been closed in all of its dups. While there is a workaround, it's still a pretty bad user experience. (My coworker ran into it today as soon as he experimented with upgrading our project to 1.7.) Is the thought that everybody who has the old .o files is likely to discover the workaround before a 1.7.1 would be released anyway, and that future versions won't have this problem because the exporter format change won't happen again? |
Yeah, this is pretty sad. @alandonovan, @griesemer, any thoughts? |
Export format changes will still happen, but hopefully they will be handled more smoothly. There is support for an internal version string. There's also an open issue regarding this, assigned to me (#16244). That said, this particular situation is due to a buggy export format that made its way into various libraries which didn't get recompiled after the fix - this would have been very hard to prevent no matter what. We don't really make any guarantees that object files (and thus the embedded export data) are compatible across different compiler versions, and certainly not if built with unreleased compilers built at tip. But going forward, the compiler will complain with a more specific error message if outdated export data is found (i.e., with the fix of #16244). |
Now that you mention it, I think my coworker who ran into this issue had experimented with some of the 1.7 RCs. |
go version
)?go env
)?If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Went to a project in my
$GOPATH
with dependencies vendored in avendor/
folder and did...Nothing, unless the vet tool found something weird in the code.
The text was updated successfully, but these errors were encountered: