bazelbuild / bazelisk

A user-friendly launcher for Bazel.
Apache License 2.0
1.96k stars 302 forks source link

FR: Support WORKSPACE.bzlmod #484

Closed satreix closed 10 months ago

satreix commented 11 months ago

I part of migrating to bzlmod, I renamed my WORKSPACE file to WORKSPACE.bzlmod. It looks like bazelisk does not support this yet.

$ mkdir new_project
$ cd new_project
$ touch WORKSPACE
$ echo '6.2.1' > .bazelversion
$ bazel --version
bazel 6.2.1

$ echo 'common --enable_bzlmod' >> .bazelrc
$ mv WORKSPACE WORKSPACE.bzlmod
$ bazel --version
bazel 6.3.0

IIUC the issue is in here: https://github.com/bazelbuild/bazelisk/blob/9943f1249b493d80333b19bf7132f7f7221ce174/bazelisk.py#L98-L101

satreix commented 10 months ago

Nevermind. As per https://docs.google.com/document/u/0/d/1JtXIVnXyFZ4bmbiBCr5gsTH4-opZAFf5DMMb-54kES0/mobilebasic?pli=1

WORKSPACE.bzlmod does NOT replace the functionality of WORKSPACE for identifying the workspace root, therefore you still need the WORKSPACE file presented at your workspace root.

This feature is not required.

brentleyjones commented 10 months ago

It can as of 7.0 though, right?