-
Notifications
You must be signed in to change notification settings - Fork 652
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
gopackagesdriver
doesn't work with golangci-lint
#3523
Comments
There are a couple issues here:
|
I've got this working now in my branch. |
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
Apr 7, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - stdlib now includes CGO processed files. - WKT for protobufs are no longer skipped when the proto wrapper is used.`
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
Apr 7, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - stdlib now includes CGO processed files. - WKT for protobufs are no longer skipped when the proto wrapper is used.`
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
Apr 25, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - stdlib now includes CGO processed files. - WKT for protobufs are no longer skipped when the proto wrapper is used.`
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 2, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 2, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - WKT for protobufs are no longer skipped when the proto wrapper is used.` Change-Id: Ie1fc571f52cf5f6d1ff94b0aea2c05c06bb4be4e
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 8, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - WKT for protobufs are no longer skipped when the proto wrapper is used.` Change-Id: Ie1fc571f52cf5f6d1ff94b0aea2c05c06bb4be4e
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 8, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 9, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 9, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 10, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662
linzhp
pushed a commit
that referenced
this issue
May 10, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes #3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662 Co-authored-by: Thomas Rampelberg <thomas.rampelberg@airbnb.com>
grampelberg
pushed a commit
to grampelberg/rules_go
that referenced
this issue
May 16, 2023
…d#3523) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - WKT for protobufs are no longer skipped when the proto wrapper is used.` Change-Id: Ie1fc571f52cf5f6d1ff94b0aea2c05c06bb4be4e
linzhp
pushed a commit
that referenced
this issue
May 24, 2023
…3524) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - WKT for protobufs are no longer skipped when the proto wrapper is used.` Change-Id: Ie1fc571f52cf5f6d1ff94b0aea2c05c06bb4be4e Co-authored-by: Thomas Rampelberg <thomas.rampelberg@airbnb.com>
tingilee
pushed a commit
to tingilee/rules_go
that referenced
this issue
Jul 19, 2023
The stdlib json currently is not populated with generated files. When CGO is being used, this means that the file list returned does not actually compile. This change adds `-compiled=true` to go list's output which results in the full set required to compile stdlib. Fixes bazelbuild#3523 Change-Id: Ic06243e7a5de68946d87ff9734156c522bfd8662 Co-authored-by: Thomas Rampelberg <thomas.rampelberg@airbnb.com>
tingilee
pushed a commit
to tingilee/rules_go
that referenced
this issue
Jul 19, 2023
…d#3523) (bazelbuild#3524) Unlike gopls which uses `file=` queries exclusively, golangci-lint uses the more generic `go list` query syntax. This change allow for file paths not prefixed with `file=` to be queried correctly. Additionally, some bugs have been fixed up: - Packages with different IDs and identical import paths work now. - WKT for protobufs are no longer skipped when the proto wrapper is used.` Change-Id: Ie1fc571f52cf5f6d1ff94b0aea2c05c06bb4be4e Co-authored-by: Thomas Rampelberg <thomas.rampelberg@airbnb.com>
@grampelberg I am trying to get golangci-lint working with bazel. Could you help me get on the right path? I have some example code here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of rules_go are you using?
v0.39.0
What version of gazelle are you using?
v0.30.0
What version of Bazel are you using?
6.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
linux-amd64
Any other potentially useful information about your toolchain?
What did you do?
Exported
GOPACKAGESDRIVER
andGOPACKAGESDRIVER_BAZEL_QUERY_SCOPE
, rangolangci-lint
.What did you expect to see?
A successful run of
golangci-lint
with notypecheck
errors.What did you see instead?
Silent failures because
golangci-lint
wasn't able to load the types from source and gave up on non-local libraries.The text was updated successfully, but these errors were encountered: