diff --git a/prelude/transitions/constraint_overrides.bzl b/prelude/transitions/constraint_overrides.bzl index b260d858f220..8d8fbb62c195 100644 --- a/prelude/transitions/constraint_overrides.bzl +++ b/prelude/transitions/constraint_overrides.bzl @@ -8,6 +8,10 @@ # NOTE: Currently, constraints can't be propagated via rule attrs and so need to be # hard-coded here. We use a read_config to avoid hard-coding these repo-specific # constraints into the prelude. +# The following configs must be set to use constraint_overrides.bzl: +# - buck2.platforms +# - buck2.constraints +# - buck2.passthrough_constraints def _platforms() -> list[str]: platforms = [] @@ -15,10 +19,6 @@ def _platforms() -> list[str]: platforms.extend( [platform.strip() for platform in config.split(",") if platform.strip()], ) - config = read_root_config("buck2", "generated_platforms", "") - platforms.extend( - [platform.strip() for platform in config.split(",") if platform.strip()], - ) return platforms def _constraints() -> list[str]: @@ -27,10 +27,6 @@ def _constraints() -> list[str]: constraints.extend( [constraint.strip() for constraint in config.split(",") if constraint.strip()], ) - config = read_root_config("buck2", "generated_constraints", "") - constraints.extend( - [constraint.strip() for constraint in config.split(",") if constraint.strip()], - ) return constraints _passthrough_constraints_val = read_root_config("buck2", "passthrough_constraints", "")