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

Editor Setup instructions out of date with Bazel v8 change in repo name naming scheme (tilde now replaced with plus) #4221

Closed
jasonbdly opened this issue Jan 9, 2025 · 2 comments

Comments

@jasonbdly
Copy link

What version of rules_go are you using?

0.51.0

What version of gazelle are you using?

0.40.0

What version of Bazel are you using?

8.0.0

Does this issue reproduce with the latest releases of all the above?

Yes, it should.

What operating system and processor architecture are you using?

Ubuntu running in WSL2 within Windows 11 64bit.

Any other potentially useful information about your toolchain?

Nothing specifically related to the underlying issue.

What did you do?

Upgraded to Bazel v8 and attempted to interact with my project through VSCode.

What did you expect to see?

I expected to see most/all functionality working correctly (builds, linting, intellisense, etc).

What did you see instead?

Most tools relying on go tooling began to fail.

Cause

I narrowed these issues down to a change in the naming scheme for autogenerated folders under the bazel-<project-name>/external directory. Specifically, anywhere the ~ character had been used in those directory names, + was now being used instead.

I discovered that Bazel v8 defaults a flag controlling this behavior to true: bazelbuild/bazel#23127. However, the setup instructions for a bzlmod project in vscode still reference the older naming scheme: https://github.com/bazel-contrib/rules_go/wiki/Editor-setup#visual-studio-code. There may be other fixes required due to this Bazel change as well, I'm not sure about the exact scope.

It took some time for me to track down the cause. This doc was one of the first places I referenced when I encountered these issues to see if anything had changed, so clarifying that change and its affects in that doc may help save some time for others running into the same issue.

@jasonbdly
Copy link
Author

I updated the Editor Setup instructions to account for this change. I was surprised to discover that I didn't need to submit a PR to make those changes, but they should be consistent with the latest Bazel behavior in v8 now.

@fmeum
Copy link
Member

fmeum commented Jan 10, 2025

Thanks, much appreciated!

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

No branches or pull requests

2 participants