bazelbuild / bazelbuild/rules_license

Remove 'cfg.= "exec"` from license()'s license_kinds attribute when users use a new enough Bazel

Open
#148 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
85
Forks
37
PR merge metrics
No merged PRs in 30d

Description

katre@ is working on exec platform resolution improvements.

As part of that we want to switch `license()` rules [from the exec configuration](https://github.com/bazelbuild/bazel/blob/1e5e75e401d6311371578e0fdf5dc47a9443b005/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java#L427) to a "no configuration". The only reason they use the exec configuration is so mullt-configured target builds don't fork `license()` rules for no reason. "No configuration" is a better expression of that but it's not available in Starlark.

https://bazel-review.googlesource.com/c/bazel/+/254333 will switch `license()` rules to use "no configuration" internally within Bazel. After that change the only remaining cleanup is removing the [license_kinds exec transition](https://github.com/bazelbuild/rules_license/blob/8d022628b306e6289dc6f1e445ed71386169438d/rules/license.bzl#L45-L46).

But we can't remove that until https://bazel-review.googlesource.com/c/bazel/+/254333 is released in an acceptable Bazel version. (Bazel 8?).

Once that happens we should remove it. See the code comments in https://bazel-review.googlesource.com/c/bazel/+/254333 for details.

Contributor guide

Open the contributing guide

Research direction

Check whether the Bazel change in review 254333 has been released in an acceptable Bazel version. Then inspect rules/license.bzl at the license_kinds exec transition around lines 45–46; done means that transition is removed after the Bazel version requirement is met.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.