-
Notifications
You must be signed in to change notification settings - Fork 17
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
TypeNotDefined error on a minimal schema w/ built-in types #496
Comments
Thanks for the report. I can reproduce this locally. My current theory is that this was introduced by cedar-policy/cedar#1060 and specifically relates to the new We didn't notice this ourselves because, as far as I can tell, this function is only use by the CLI for cedar-policy-generators which we don't currently use for anything. |
I need to dive into it further but a preliminary analysis reveals that |
Yes, there's a lot of logic at https://github.com/cedar-policy/cedar/blob/ed35ba7e2502c202a051e73e0bb8e4129244e73f/cedar-policy-validator/src/schema.rs#L382 that should probably be done in |
Arguably it's a design flaw that |
Before opening, please confirm:
Bug Category
Schemas and Validation
Describe the bug
A valid schema fails with a
TypeNotDefined
error when building a raw schema fragment.Expected behavior
The schema fragment should be constructed w/o panicking.
Reproduction steps
Code Snippet
Given a schema with a single entity definition
Loading a schema from a file,
panics on the
Schema::from_raw_schemafrag(fragment, SETTINGS.clone(), &mut u)
call with the following stack traceLog output
Additional configuration
No response
Operating System
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: