-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with nested path and variable-style parameters #186
Comments
Spent some time trying to undersand what is going on. I think triggering the error can be minimize to:
This might be a hint,
|
Thank you for reporting. I fixed the bug. |
wader
added a commit
to wader/fq
that referenced
this issue
Aug 22, 2022
Fixes itchyny/gojq#186 skip appending path while variable argument evaluation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to do performance and feature-coverage comparisons between jq and gojq using my wsjq Whitespace interpreter, which is considerably complex for a jq program (and overcomes the limitations of your jq Brainfuck interpreter). However, in the process, I uncovered a bug in gojq. Here's an example, reduced from various instructions in
interpret_step
:If any of one these changes are made to the example program, it will run without error:
$cond
->cond
def assert(cond; msg): cond as $cond | …
(the jq docs imply that this is equivalent)assert/2
inat/1
{ stack: [1, 2, 3] }
and.stack
->[1, 2, 3]
and.
So, the problem appears to be caused by a nested path generated by a filter that uses variable-style parameters.
The text was updated successfully, but these errors were encountered: