Builtin changes for v1? #645
-
I have unit tests for various builtin scenarios, and those worked nicely up until going from 0.68 to v1. The other stuff (if) was easy to figure out (and guess from the release notes), however, with the builtins the error message doesn't help me much. christophwille/dotnet-opa-wasm#57 (comment) On building the wasm I get Can someone please point me in the right direction of how-to fix-up .68 to v1 builtin regos? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi there! If you've changed your policies to follow 1.0 conventions (removed Alternatively, if you want to keep using the old syntax for a while, you should be able to run the Let me know how it goes! |
Beta Was this translation helpful? Give feedback.
Hi there!
If you've changed your policies to follow 1.0 conventions (removed
import rego.v1
and such), you'll need to get a capabilities.json file which contains therego_v1
capability, or else the parser is going to work as it did before 1.0, and won't recognize that as valid. You can find capabilities files, including v1.0.0 here.Alternatively, if you want to keep using the old syntax for a while, you should be able to run the
opa build
command with the--v0-compatible
flag, and that should hopefully work with the capabilities file that you have (but would require that you keeprego.v1
imports).Let me know how it goes!