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
Rules can be written in the form <var> = <ground term>. This is useful for defining constants; it would be nice if we could do the same with terms containing refs. Currently, the parser will return an error because it deems the term as being non-ground (since references have not been resolved yet).
One solution would be to update the parser to allow non-ground terms. If the user did include a variable in the value and that variable was not eventually resolved, the compiler should catch the error when performing the safety checks on the head.
Example parse error:
torin:~$ opa run test.rego
test.rego:7: expected rule (annotations_versioned = {
"metadata": {
"annotations": annotations,
"resourceVersion": object.metadata.resourceVersion
}
} must be declared inside a rule)
Rules can be written in the form
<var> = <ground term>
. This is useful for defining constants; it would be nice if we could do the same with terms containing refs. Currently, the parser will return an error because it deems the term as being non-ground (since references have not been resolved yet).One solution would be to update the parser to allow non-ground terms. If the user did include a variable in the value and that variable was not eventually resolved, the compiler should catch the error when performing the safety checks on the head.
Example parse error:
Example input:
The text was updated successfully, but these errors were encountered: