mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
93c177449c
to allow for using Rego v1 bundles in `opa build`/`check`/`eval`/`test`. Before this change, a bundle with `1` as `rego_version`/`file_rego_versions` would be rejected when evaluated with the `--v0-compatible` flag with the error: ``` rego_parse_error: illegal capabilities: rego_v1 feature required for parsing v1 Rego ``` This is fixed by adding the `rego_v1` feature to the `v0` default capabilities applied when using the `--v0-compatible` flag. Note: this allows OPA to accept Rego `v1` modules inside bundles, but modules without a specified Rego version, such as freestanding non-bundle modules or modules inside bundles with no specified Rego version, are parsed as `v0`. Signed-off-by: Johan Fylling <johan.dev@fylling.se>