bazelbuild / bazelbuild/platforms
Platform Commonalities: e.g. Apple, POSIX, etc.
- Dominant language
- Starlark
- Stars
- 124
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Hi wonderful Bazel Platforms folks!
First and foremost, thanks for working to create something centralized and great here. It's so nice to have official support for modeling cross-platform code with platform-specific backends (among other goodies).
I'd like to float an idea for making official something I find myself rebuilding pretty much every time I use platforms.
Lots of platforms (err constraint_values) have considerable code in common. It can be nice to select on this commonality. Some examples are: Apple Platforms. POSIX/UNIX-compliant platforms. Etc.
It's not hard to model these (example below), but it'd be awesome to have them in the @platforms repo for everyone to use!
```
load("@bazel_skylib//lib:selects.bzl", "selects")
selects.config_setting_group(
name = "Apple",
visibility = ["//visibility:public"],
match_any = ["@platforms//os:macos", "@platforms//os:ios", "@platforms//os:tvos", "@platforms//os:watchos"],
)
```
Happy to contribute of course--and would have made this a PR--except that I'm not sure quite how this repo is being automagically integrated into Bazel proper. Therefore I wasn't sure how to properly get skylib.
Thanks again, additionally for your consideration!
Chris
(ex-Googler)
Contributor guide
Assessment
This issue has not been assessed yet.