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
// 90% of the time choose an existing extension function, but sometimes don't
This is a little problematic for DRT because the Lean spec treats these unknown names as parse errors while the the Rust code treats them as evaluation/validation errors.
We should either unify the behavior here, or stop generating unknown names.
Note: the public interface checks for unknown function names at parse time and will issue appropriate errors for expressions like undefinedFunction(foo) or foo.undefinedMethod(bar). DRT currently bypasses parsing (related: #75, #76), which is why is unknown names are allowed to appear in the Expr type.
Describe alternatives you've considered
No reponse
Additional context
No response
Is this something that you'd be interested in working on?
👋 I may be able to implement this feature request
⚠️ This feature might incur a breaking change
The text was updated successfully, but these errors were encountered:
Note: unknown function names are currently denied by the parser for Cedar policies in "human" format (specifically during CST->AST), but are currently allowed by the parser for Cedar policies in JSON format (during EST->AST). If you construct a policy by Policy::from_json() in the public API, it will happily construct an AST with an unknown function name.
Category
DRT generator(s)
Describe the feature you'd like to request
The current generators almost always generate defined extension function names, but intentionally generate non-existing ones 10% of the time:
cedar-spec/cedar-policy-generators/src/expr.rs
Line 191 in 1e74bd5
This is a little problematic for DRT because the Lean spec treats these unknown names as parse errors while the the Rust code treats them as evaluation/validation errors.
We should either unify the behavior here, or stop generating unknown names.
Note: the public interface checks for unknown function names at parse time and will issue appropriate errors for expressions like
undefinedFunction(foo)
orfoo.undefinedMethod(bar)
. DRT currently bypasses parsing (related: #75, #76), which is why is unknown names are allowed to appear in theExpr
type.Describe alternatives you've considered
No reponse
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: