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

[CLI] bb specific commands don't work when using .bazelversion #6445

Closed
brentleyjones opened this issue Apr 25, 2024 · 5 comments
Closed

[CLI] bb specific commands don't work when using .bazelversion #6445

brentleyjones opened this issue Apr 25, 2024 · 5 comments
Assignees

Comments

@brentleyjones
Copy link
Contributor

Describe the bug

bazel print doesn't work when using the CLI through .bazelversion. When invoked directly on the binary it does.

To Reproduce

$ echo "$(echo "buildbuddy-io/5.0.54"; cat .bazelversion)" > .bazelversion
$ bazel print
Starting local Bazel server and connecting to it...
Command 'print' not found. Try 'bazel help'.
$ /Users/brentley.jones/Library/Caches/bazelisk/downloads/sha256/c88b051f9a24623495c0e5bc96a6b819f65757d69a2d005be5175764c5
d9659b/bin/bazel print

usage: bb print [--grpc_log=PATH] [--compact_execution_log=PATH] [--sort=true]

Prints a human-readable representation of log files output by Bazel.
@sluongng sluongng self-assigned this Apr 25, 2024
@sluongng
Copy link
Contributor

Oh, interesting 🤔

I wonder if the print subcommand is blocked on the Bazelisk level. Will investigate.

@brentleyjones
Copy link
Contributor Author

Any update on this?

@fmeum fmeum assigned fmeum and unassigned sluongng May 23, 2024
@fmeum
Copy link
Contributor

fmeum commented May 23, 2024

I can't reproduce this locally on macOS:

$ mkdir bazel-print
$ cd bazel-print
$ touch MODULE.bazel
$ echo "7.1.2" > .bazelversion
$ echo "$(echo "buildbuddy-io/5.0.54"; cat .bazelversion)" > .bazelversion
$ which bazel
$ bazel print

usage: bb print [--grpc_log=PATH] [--compact_execution_log=PATH] [--sort=true]

Prints a human-readable representation of log files output by Bazel.

Currently supported log types:
  --grpc_log: Path to a file saved with --experimental_remote_grpc_log.
  --compact_execution_log: Path to a file saved with --experimental_execution_log_compact_file.

@brentleyjones What happens if you run these commands? Which version of bazelisk are you using?

@brentleyjones
Copy link
Contributor Author

brentleyjones commented May 23, 2024

Those steps don't fail, but they do in our internal repo. Checking to see what's different. I believe it has to do with using a tools/bazel wrapper.

@brentleyjones
Copy link
Contributor Author

Our wrapper adds a bunch of flags to commands that come through, which causes the BB CLI to interpret print as a bazel command and passes it through. We will fix on our side.

@brentleyjones brentleyjones closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
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

3 participants