google / cel-go

Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)
https://cel.dev
Apache License 2.0
2.19k stars 218 forks source link

Stabilize macro id generation #962

Closed TristonianJones closed 3 months ago

TristonianJones commented 3 months ago

Update the macro id generation to occur in sorted order.

This issue is somewhat difficult to trigger, but any expression with two macros present within it should eventually trip the issue.

The test has been updated to removed some redundant conditions which were extant once the macro tracking in the test optimizer was fixed to reflect how macro id tracking works within the production optimizers.