-
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
x/tools/go/packages: LoadSyntax and LoadSyntaxAll are now the same #31148
Comments
I ran into this today as well, makes my CI/CD pipeline fail. My issue is also related to |
This is now fixed in golangci-lint: golangci/golangci-lint@de1d1ad. I'm going to close this issue for now, but if another case like this pops up, we can think about putting in a "dummy" bit that does nothing to distinguish LoadSyntax and LoadAllSyntax |
(Please reopen if that doesn't seem like a good solution) |
@matloob as far as I can tell, this is still causing problems roughly 2 months later.
You had written in golangci/golangci-lint@de1d1ad#commitcomment-33008947:
It sounded like you had an idea for fixing this within x/tools/go/packages:
Could that change happen? If not, could this bug be re-opened, at least until there is a Also, I have only briefly tried to tease apart the history here; apologies if I am not fully following the history. CC @dmitshur |
Did the commit golangci/golangci-lint@de1d1ad not fix the issue, or is the problem that there was no new release tag made that includes that commit? Checked myself (golangci/golangci-lint@v1.16.0...master), the problem is that there's no new release tag. This seems like an issue that needs to be solved in the golangci-lint project, and not x/tools. Making changes to x/tools won't help if the golangci-lint doesn't update to a newer version and issue a new release. Please let me know if you think there is something else that can be done here. |
…lint@HEAD @Head is required to include a fix related to golang/go#31148
What version of Go are you using (
go version
)?N/A; this applies to commit dbeab5a, I think.
Does this issue reproduce with the latest release?
Not exactly.
What operating system and processor architecture are you using (
go env
)?N/A.
What did you do?
Ran
go get -u
on something with a go.mod file referring to an older version of x/tools.What did you expect to see?
Probably the build succeeding anyway.
What did you see instead?
So the issue is, something elsewhere has a switch to show which of the Load constants something is, and this switch breaks because the patch made LoadSyntaxAll and LoadSyntax be the same value. This... may actually be fine. I don't know whether it's intentional or not, I don't entirely think that the external package (golangci-lint) should be that aware of the internals, but I'm also of the opinion that this feels sort of like a breaking change that probably shouldn't be a breaking change -- if nothing else, it seems like there should be a distinction between these, since there used to be a documented distinction.
This is easily avoided by not running
go get -u
, but I figured I should note that the change appears to have broken at least one thing somewhere.The text was updated successfully, but these errors were encountered: