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: detect unsupported build systems and improve error messages/performance #43937

Open
andybons opened this issue Jan 27, 2021 · 0 comments

Comments

@andybons
Copy link
Member

@andybons andybons commented Jan 27, 2021

I recently ran into issues caused by bazelbuild/rules_go#512, but the error message displayed by gopls seemed unrelated. Within my editor (VS Code) I just see Error loading workspace: go [-e -json -compiled=true -test=true -export=false -deps=false -- builtin <redacted>: exit status 2: warning: ignoring symlink ....

I spoke with @stamblerre to diagnose the issue and it came down to the fact that gopls doesn’t know about generated files due to the Bazel Go rules issue linked above. It’s even stated in the README:

gopls currently only supports the go command, so if you are using a different build system, gopls will not work well. Bazel support is currently blocked on bazelbuild/rules_go#512.

I was curious of whether it would be possible to detect a WORKSPACE file at the directory root and display a more helpful error or warning. One could even disable certain features or bail early from long-running commands that repeatedly fail.

ccing @jayconrod for any insight into detecting an unsupported build system like Bazel.

Thanks, all!

@gopherbot gopherbot added the Tools label Jan 27, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants