v2: Add `--v2-compatible` flag
Author: johanfyllingCreated Sep 23, 2026Updated Sep 25, 2026
When the --v2-compatible flag is applied to a CMD, policies are assumed to be v2 Rego syntax, and rego.v2, future.keywords.and, future.keywords.or, and future.keywords.not imports are no longer necessary for keyword activation.
Mirrors the --v1-compatible flag in function, but for v2 instead of v1.
For early opt-in to OPA 2.0 (import rego.v2) behavior. When OPA 2.0 is released, this flags becomes a hidden no-op.
Source: open-policy-agent/opa