- That picks up version that users cfg=exec instead of cfg=host
- It still works with bazel 5.x. The next rules_license might not.
- bump our version to 0.0.7 for next release
- add presubmit check that we did not mistmatch the license
- Done for both WORKSPACE and bzlmod styles
- The dependency is different because rules_license is not
up to date in the BCR. I'll correct that at the next
rules_license release.
The bazel docs [1] currently recommend users to create an
`incompatible` constraint in their own code base. This constraint is
useful in expressing more advanced target compatibilities.
Currently every project has to create their own definition for this
constraint. That is unnecessary proliferation of something that can be
easily centralized here.
This patch makes it so users will be able to use the following pattern
in their BUILD files:
cc_library(
name = "unixish_lib",
srcs = "unixish_lib.cc",
target_compatible_with = select({
"@platforms//os:osx": [],
"@platforms//os:linux": [],
"//conditions:default": ["@platforms//:incompatible"],
],
)
[1]: https://docs.bazel.build/versions/master/platforms.html#skipping-incompatible-targets