bazelbuild / bazelbuild/bazelisk
Have bazelisk log its error messages with a prefix that explains who is producing the message.
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
Here's an error message I observed:
```
╰─>$ bazel run //ip/wb/...
2025/07/13 12:45:32 could not resolve the version '# LICENSE sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4' to an actual version number: Invalid version '# LICENSE sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4'
```
Turns out that the issue was that I added the above comment into `.bazelversion`. All well and good, and justified - but it would be nice to have bazelisk print a prefix that explains which program printed the error, to make this less ambiguous. It would also be nice if the "could not resolve the version" explains where problem string is coming from (in this case, from `.bazelversion`)
Contributor guide
Research direction
Reproduce the report with `bazel run //ip/wb/...` and a comment such as `# LICENSE sha256: ...` in `.bazelversion`. Trace Bazelisk's version-resolution error path; done means errors identify Bazelisk and indicate that the invalid value came from `.bazelversion`, with tests covering the reported input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100