-
Notifications
You must be signed in to change notification settings - Fork 638
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 failing for go_binary #3270
Comments
I'm not too familiar with the code, but I don't see a reason why we wouldn't want to list |
yeah, that's reasonable. Can you send a pull request? |
Yup I'd be happy to. Thanks for the sanity check |
DrewMonroe
added a commit
to DrewMonroe/rules_go
that referenced
this issue
Aug 17, 2022
As discussed in bazelbuild#3270, The current implementation of `bazel_json_builder` does not handle `go_binary` build rules. This means that when `gopackagesdriver` attempts to be used on a file that is apart of a `go_binary`, no build target is produced as the output of `bazel query`. This prevents downstream utilities (`gopls`) from being able to provide functionality such as autocompletion support. This PR simply adds `go_binary` as a supported rule type, fixing bazelbuild#3270.
fmeum
pushed a commit
that referenced
this issue
Aug 17, 2022
As discussed in #3270, The current implementation of `bazel_json_builder` does not handle `go_binary` build rules. This means that when `gopackagesdriver` attempts to be used on a file that is apart of a `go_binary`, no build target is produced as the output of `bazel query`. This prevents downstream utilities (`gopls`) from being able to provide functionality such as autocompletion support. This PR simply adds `go_binary` as a supported rule type, fixing #3270.
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.34.0
What version of gazelle are you using?
v0.24.0
What version of Bazel are you using?
v 5.2.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Arch linux, 5.18.16 kernel, x86_64
Any other potentially useful information about your toolchain?
What did you do?
Configure
gopackagesdriver
for vim as describe in the docs. Create ago_library
, and ago_binary
that depends on that library. Vim is able to autocomplete for thego_library
, but not thego_binary
. Specifically, thebazel query
command run bygopackagesdriver
is not returning the name of build target, causing an error whenbazel build
is run by the driver.Adding
go_binary
to the return of thefileQuery
function for theBazelJSONBuilder
struct solves the problem.What did you expect to see?
Vim should have autocompletion options.
What did you see instead?
No autocompletion options.
I'm happy to submit a PR for the one line change, but wanted to create an issue to make sure this behavior wasn't intentional.
The text was updated successfully, but these errors were encountered: