-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the environment_group
pseudo-rule and environment
rule
#10849
Comments
Tagging @gregestren for context and history. |
This is fair. We've kept it undocumented because platforms should (I think) supplant most practical uses of this and we don't want too forked an API as we can help it. But the cat's out of the bag already and we can clarify these relationships and best practices in the docs. |
One thing that isn't covered by platforms but can be done with constraints (although awkwardly) is preventing a target from transitively depending on targets which are mutually exclusive (regardless of platform), e.g.
There shouldn't be any need to define and use a new platform to express and enforce this kind of constraing. |
I acknowledge platforms don't solve all use cases naturally. Product features (like "free" vs. "premium") are a prominent counterexample. In your above example, would |
This case came up internally specifically around avoiding known ODR violations at build time by declaring two libraries explicitly incompatible. A fairly niche case, to be sure, but considering the hard-to-debug breakages such issues can cause seemed potentially valuable to support. |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
There is no documentation for either the
environment_group
pseudo-rule or theenvironment
rule.environment
appears to have one piece of documentation (for thefullfills
attribute), but that can't be found because the overall rule isn't documented.environment_rule
is implemented by a Starlark function and is explicitly called out as undocumented.The text was updated successfully, but these errors were encountered: