-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate and remove any() and all() functions #2437
Labels
Comments
@gaga5lala That is correct, however I'm not sure how soon we would want to make the change. These backwards compatibility changes will need to be handled carefully. |
💭 While we're at it, should we drop |
anderseknert
added a commit
to anderseknert/opa
that referenced
this issue
Mar 9, 2021
Since there are better ways of doing what they do and they tend to confuse people new to Rego we'll hide these from the policy reference for now. Will eventually be deprecated and removed with issue open-policy-agent#2437. Signed-off-by: Anders Eknert <[email protected]>
tsandall
pushed a commit
that referenced
this issue
Mar 9, 2021
Since there are better ways of doing what they do and they tend to confuse people new to Rego we'll hide these from the policy reference for now. Will eventually be deprecated and removed with issue #2437. Signed-off-by: Anders Eknert <[email protected]>
This was referenced Mar 12, 2021
Closed
Closed
Closed
chore(deps): Bump github.com/open-policy-agent/opa from 0.27.0 to 0.27.1
BrunoReboul/ram#147
Merged
Closed
Closed
johanfylling
added a commit
to johanfylling/opa
that referenced
this issue
Jan 28, 2022
Updating compiler strict mode to produce error when these deprecated methods are used. Fixes: open-policy-agent#2437 Signed-off-by: Johan Fylling <[email protected]>
srenatus
pushed a commit
that referenced
this issue
Jan 31, 2022
Updating compiler strict mode to produce error when these deprecated methods are used. This introduces a new stage to ast.Compiler and ast.QueryCompiler. Fixes: #2437 Signed-off-by: Johan Fylling <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should deprecate and eventually remove the
any()
andall()
built-in functions. Neither of these functions implement behaviour that's otherwise hard to implement in Rego yet their implementation makes some arbitrary assumptions that are problematic (e.g., non-true/false values are not considered "true-ish" like most other Rego constructs asusme, both are satisfied by empty collections, etc.)The any function is particularly bad since there is almost no difference between saying
any({x | ...})
and simply...
. Similarly, once we have the every keyword (#2090) the need forall
will be substantially reduced.The text was updated successfully, but these errors were encountered: