-
Notifications
You must be signed in to change notification settings - Fork 91
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
Allow Introspection on RestrictedExpression #1151
Comments
@ShiromMakkad could you clarify why introspection is needed? I think for the alternative, you can evaluate restricted expressions into values and do the equality testing. |
It's for convenience in unit testing. It could be done like I showed above or |
Deriving equality on RestrictedExpression sounds perfectly reasonable to me. We'll have cases like, the restricted expression |
more to the point of @ShiromMakkad 's above example, derived equality on RestrictedExpression would find that |
I think it's fine in the current version to go for a more restrictive result where |
The second interpretation (where |
Ok, then I'd prefer the first way where "16.0" != "16.00" |
Category
User level API features/changes
Describe the feature you'd like to request
For testing purposes, I'd like to access the inner value of a restricted expression. For example,
Describe alternatives you've considered
It would be fine if that's not possible if we could just compare equality between RestrictedExpressions like so:
I haven't dug around the Cedar codebase but I think you can just
#[derive(PartialEq, Eq)]
.Additional context
For now we're doing:
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: