google / cel-go

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

Stabilize macro id generation #962

Closed TristonianJones closed 5 months ago

TristonianJones commented 5 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.