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

x/tools/gopls: support for bazel-based projects #37205

Open
gonzojive opened this issue Feb 13, 2020 · 5 comments
Open

x/tools/gopls: support for bazel-based projects #37205

gonzojive opened this issue Feb 13, 2020 · 5 comments
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@gonzojive
Copy link

gonzojive commented Feb 13, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.1 linux/amd64

Does this issue reproduce with the latest release?

n/a

What operating system and processor architecture are you using (go env)?

n/a

What did you do?

Wrote a project with bazel with .go files and .proto files. The protobufs generate go code, which I'm not sure how to make understandable to gopls. Code completion for this code does not work in VSCode.

What did you expect to see?

  1. Documentation of how to set up a Bazel-based project in the User guide.
  2. An example project that works and loads in an IDE like VS Code

What did you see instead?

Scattered information on the level of support and no example projects.

Related links:

  1. Expose generated Go files to editors and IDEs bazelbuild/rules_go#512 - main source of updates on gopackagesdriver progress
  2. https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration: Design doc for gopackagesdriver - I'm not sure how accurate this is
  3. support for GOPACKAGESDRIVER env variable? microsoft/vscode-go#2755 - gopls support for GOPACKAGESDRIVER in VS Code
  4. Integration with Go editor tooling bazelbuild/rules_go#393 - editor integration issue for rules_go
  5. x/tools/go/packages: document GOPACKAGESDRIVER #34341 - documentation request for GOPACKAGESDRIVER
  6. Code: jmhodges/rules_go/go/tools/gopackagesdriver, gopackagesdriver in rules_go feature branch, tools/go/packages/external.go seems to implement the external packages driver
@gopherbot gopherbot added this to the Unreleased milestone Feb 13, 2020
@gopherbot gopherbot added Documentation Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 13, 2020
@gopherbot
Copy link
Contributor

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gonzojive gonzojive changed the title x/tools/gopls: Support and document for bazel-based projects x/tools/gopls: Support and documentation for bazel-based projects Feb 13, 2020
@stamblerre stamblerre changed the title x/tools/gopls: Support and documentation for bazel-based projects x/tools/gopls: support and documentation for bazel-based projects Feb 13, 2020
@stamblerre
Copy link
Contributor

Did you use @jmhodges's Bazel implementation for GOPACKAGESDRIVER when you tried out gopls with Bazel? Is it ready for use?

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Feb 13, 2020
@gonzojive
Copy link
Author

I did not try out jmhodge's implementation yet - I just browsed the code there.

@stamblerre
Copy link
Contributor

I see. We don't support any build system that doesn't have an official gopackagesdriver, so I will defer to @jmhodges and @jayconrod on the status of that work.

@jayconrod
Copy link
Contributor

Tracking issue for that is bazelbuild/rules_go#512.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants