-
Notifications
You must be signed in to change notification settings - Fork 5
Add support for cel expressions to scalar types #52
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
base: main
Are you sure you want to change the base?
Conversation
bufdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is surprising behavior for a yaml library, and not something I'd expect to automatically occur. If we were to add this down the road, it would need extensive documentation including in readme, package docs, and API, explaining how this works, and the need for it.
Overall, I'd expect to be able to fuzz protojson against protoyaml and see no difference in behavior.
| // returning an error. | ||
| DiscardUnknown bool | ||
|
|
||
| // CelEnv is the CEL environment to use for evaluating CEL expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would need more documentation: why is this here, what is it for, why is it part of a yaml library
|
protoyaml is not protojson and you cannot fuzz them like that for many reason. |
Since protoyaml depends on protovalidate, cel-go is already a dependency.
Scalars that do not trivially parse are passed through cel to see if they can be evaluated.
The tag
!celcan be used to force cel evaluation for strings.Similar to protovalidate,
thisandnoware bound.