Skip to content
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

Add support for go_binary to gopackagesdriver. #3271

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

DrewMonroe
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
This PR adds go_binary as a supported rule type, fixing a bug preventing features like autocomplete from working when using gopackagesdriver.

Which issues(s) does this PR fix?

Fixes #3270

Other notes for review
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.

I didn't see any tests to update, but let me know if I missed something and I'm happy to make changes.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gopackagesdriver failing for go_binary
2 participants