MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

Revisit evaluation orderings #60

Open MiSawa opened 2 years ago

MiSawa commented 2 years ago

Related to #55, I think we need to revisit all parts of compiler that compiles multiple inner "components" so that the evaluation order of them are the same with that of jq/gojq.

itchyny commented 2 years ago

Maybe still different in arguments order?

❯ jq -nc '[1,2,3] | setpath(0,1,2 | [.]; 4,5)'
[4,2,3]
[1,4,3]
[1,2,4]
[5,2,3]
[1,5,3]
[1,2,5]

❯ xq -nc '[1,2,3] | setpath(0,1,2 | [.]; 4,5)'
[4,2,3]
[5,2,3]
[1,4,3]
[1,5,3]
[1,2,4]
[1,2,5]

❯ xq --version
xq 0.2.0-3dc2f51b9f2a022984a912fe72a0dacc35e117ec