-
Notifications
You must be signed in to change notification settings - Fork 323
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
.bazelversion not being read in parent directory outside of WORKSPACE #523
Comments
I just stumbled over the same issue, but wanted to add that the file is also not read from the current directory if there is no WORKSPACE file. In our case we want to check the users Bazel version for a start script and print out a warning if it's outside the expected version range, but on CI we want to use a fixed version so a This happens before the start script is called, and causes bazelisk to download the latest Bazel version, which will currently result in a version warning, but the start script goes on to create a Bazel project at which point bazelisk switches to the configured version (downloading that) and uses that. |
Related: #502 |
bazelisk does not read the `.bazelversion` file when there is no WORKSPACE and first fetches the latest Bazel version, which causes a warning and later fetches the Bazel version specified in the `.bazelversion` file. See bazelbuild/bazelisk#523
bazelisk does not read the `.bazelversion` file when there is no WORKSPACE and first fetches the latest Bazel version, which causes a warning and later fetches the Bazel version specified in the `.bazelversion` file. See bazelbuild/bazelisk#523
bazelisk does not read the `.bazelversion` file when there is no WORKSPACE and first fetches the latest Bazel version, which causes a warning and later fetches the Bazel version specified in the `.bazelversion` file. See bazelbuild/bazelisk#523
bazelisk does not read the `.bazelversion` file when there is no WORKSPACE and first fetches the latest Bazel version, which causes a warning and later fetches the Bazel version specified in the `.bazelversion` file. See bazelbuild/bazelisk#523
I can confirm that this is still an issue with bazelisk 1.25.0. |
Hi wonderful bazelisk folks,
First and foremost, thanks for a stupendous launcher. Bazelisk is really valuable and I really appreciate all the work you've done here.
I'm writing in to report a bug--or at least an instance where the docs are inconsistent with bazelisk's behavior.
The readme says:
but Bazelisk seems to stop that search at a workspace boundary rather than any parent directory.
I think the documented behavior is probably the more desirable one. Projects often have a nested test workspace, and it'd be nice to inherit from the parent workspace. At least that was true of https://github.com/Neargye/magic_enum, where this was causing confusion. And I'd imagine any hardcoding of WORKSPACE files might need updating with the bzlmod changes, where a WORKSPACE file is no longer required. (But there might be other good reasons for the other behavior! In that case, the docs could use a change.)
Thanks so much for all you do,
Chris
(ex-Googler)
The text was updated successfully, but these errors were encountered: