Skip to content

Conversation

@Alfus
Copy link
Contributor

@Alfus Alfus commented Jan 1, 2025

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 !cel can be used to force cel evaluation for strings.
Similar to protovalidate, this and now are bound.

@Alfus Alfus requested a review from rodaine January 1, 2025 23:56
@Alfus Alfus changed the title Add support for cel expression to scalar types Add support for cel expressions to scalar types Jan 2, 2025
Copy link
Member

@bufdev bufdev left a 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.
Copy link
Member

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

@Alfus
Copy link
Contributor Author

Alfus commented Apr 25, 2025

protoyaml is not protojson and you cannot fuzz them like that for many reason.

@Alfus Alfus marked this pull request as draft April 25, 2025 15:16
@rodaine rodaine removed their request for review November 17, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants