Stephan Renatus
Stephan Renatus
#4912 seems to match this, too.
Thanks for the detailed report. :eyes: I'm afraid I'm not sure I fully understand what you're referring to as _duplicates_ here. The first block seems impossible, given that it contains...
I've just now realised that there's everything I need to reproduce this in the first message đ I'll play some with this locally. Usually, I prefer `opa eval -fsource -p`...
Let's see where the queries comes from... đ Taking this (from object/record/allow.rego) for an example, ```rego # delegated to draft dataset rules allow { trace(input.object.allow) isDraftDataset [resourceType, operationType, resourceUriPrefix] :=...
Some sort of post-processing logic in OPA's PE machinery would make sense, I think. Just need to figure out here the best place to put it would be đ¤
I've given this a go with some code on this branch and the number of `allow` rules went from 700ish to 113. Would you like to try it? đ https://github.com/srenatus/opa/tree/sr/copyprop/deduplicate-expressions
`E_TOOMANYPRS` đ I'll re-open this one when the preliminary stuff is in: #4776.
So code formatting is another entrypoint for module ASTs we don't control. I think it'll be worthwhile to make this more robust... I'm thinking that instead of a field, we...
Note to self: ```rego package x.y p = 1 q = 2 { false } r["a"] = 3 r["b"] = 4 { false } s["elem1"] s["elem2"] { false } ```...
âšī¸ Included the commit of #5057 because some tests depend on the ordering. Will rebase that away later.