bazelbuild / bazelbuild/bazel-skylib
Typo in selects.bzl
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
This should be `setting !=`, not `settings` which will never match the string.
https://github.com/bazelbuild/bazel-skylib/blob/dc080e95161964a1ff841bfd0b871a1123c027a8/lib/selects.bzl#L141
More context:
```
for setting in settings:
if settings != "//conditions:default":
new_settings.append(setting)
```
This should've been 'setting' and, once fixed, it exposes the fact that
_config_setting_always_true() and _config_setting_or_group() recursively call each other and that causes bazel to fail. At least it used to some time back when I ran into this for the first time.
Contributor guide
Research direction
Start at lib/selects.bzl#L141 and compare the loop variable with the condition shown in the issue. After checking that typo, inspect _config_setting_always_true() and _config_setting_or_group() for the reported recursive failure, then verify the corrected behavior with Bazel. Done means the intended setting is matched and Bazel no longer fails from the exposed recursion.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100