-
-
Notifications
You must be signed in to change notification settings - Fork 662
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: returns roots for incompatible targets #3805
Comments
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.44.0
,master
What version of gazelle are you using?
n/a
What version of Bazel are you using?
8.0.0-pre.20231030.2
Does this issue reproduce with the latest releases of all the above?
yes
What operating system and processor architecture are you using?
macOS, arm64
Any other potentially useful information about your toolchain?
n/a
What did you do?
In VSCode configured to use
gopackagesdriver
, open any Go file.My repository contains some platform-specific targets in our
third_party
(vendor) directory. We don't wantbazel test //...
to match those, so they're marked withtarget_compatible_with
. For example:What did you expect to see?
No errors. VSCode should load metadata about Go packages and should support editor features like go-to-definition.
What did you see instead?
In the bottom status bar, I see the error:
Analysis
This happens because the response from
gopackagesdriver
includes@//third_party/go/golang.org/x/sys/windows/registry:registry
in the list of roots (which loading metadata for all packages), but it's not in the package list. The error message is printed bypackages.Load
. I think we should not include the package in the roots because it's not buildable on the host platform.bazel query
does match it, butbazel build
can't analyze it. There's no.pkg.json
file produced for it.The text was updated successfully, but these errors were encountered: