bazelbuild / bazelbuild/bazelisk
Support special value for USE_BAZEL_VERSION to mean "ignore the environment variable"
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes it would be nice to set USE\_BAZEL\_VERSION to some special value (e.g. `default`) to mean the same as unset. For example, in https://github.com/phst/rules_elisp/blob/1ea988db24653552f97c02e6c2681b2a846ea952/.github/workflows/bazel-test.yaml#L32-L35 I use the GitHub workflow "matrix" support to test my code with different Bazel versions, with `default` meaning "take the version from .bazelversion". I have to manually encode that logic in https://github.com/phst/rules_elisp/blob/1ea988db24653552f97c02e6c2681b2a846ea952/.github/actions/set-up/action.yaml#L135-L142, it would be a bit easier if I could just say `USE_BAZEL_VERSION=default`.
Contributor guide
Research direction
Start by tracing Bazelisk's handling of USE_BAZEL_VERSION and how it falls back to .bazelversion. Define the requested special value, such as default, to behave like an unset variable, then add coverage showing that normal explicit versions and the existing unset behavior remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100