You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Misleading toolchain API documentation for requires_true, requires_false #617
P3We're not considering working on this, but happy to review a PR. (No assignee)category: toolchainstype: bugSomething that should be working isn't working
While configuring a toolchain, we were trying to override the legacy fully_static_link feature to always be enabled, except when the variable is_cc_test is true or if the target needs runtime libraries.
The documentation for requires_true (requires_false) says that the given variable will be checked for truthiness (falsiness). so we were trying to use them in the following setup:
We were expecting requires_false = "@rules_cc//cc/toolchains/variables:runtime_library_search_directories" to work, as Bazel's expand_if_true/expand_if_falseevaluate an empty sequence to false, however we get an error as the current implementation restricts the allowed types to bool.
Patching nested_args.bzl to accept list as well makes our setup work.
We think either the documentation should be updated to reflect that only variables of type bool are accepted, or the implementation should match what expand_if_true/expand_if_false do.
changed the title [-]Misleading toolchain API documentaiton for requires_true, requires_false[/-][+]Misleading toolchain API documentation for requires_true, requires_false[/+]on Mar 3, 2026
P3We're not considering working on this, but happy to review a PR. (No assignee)category: toolchainstype: bugSomething that should be working isn't working
Activity
[-]Misleading toolchain API documentaiton for requires_true, requires_false[/-][+]Misleading toolchain API documentation for requires_true, requires_false[/+]