bazelbuild / rules_license

Apache License 2.0
78 stars 28 forks source link

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

Open gregestren opened 2 months ago

gregestren commented 2 months ago

katre@ is working on exec platform resolution improvements.

As part of that we want to switch license() rules from the exec configuration 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.

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.

fmeum commented 2 months ago

You can use https://github.com/bazel-contrib/bazel_features to conditionally remove the exec transition only in those versions of Bazel that include the change.