Repository navigation
fix(jq): follow jq's input stream, per-file names and per-input errors - #2592
Merged
Merged
Conversation
-n leaves the stream to input/inputs, -s on empty input gives [], files are read one by one (input_filename, jq's line counting), missing files are skipped with exit 2, runtime errors are reported with their location and processing continues, input fails with 'No more inputs', -e uses the last output, values before a syntax error are processed. Claude-Session: https://claude.ai/code/session_01VscpEzxtqpCKx5eRMpywNj
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 7f1eb18 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 08:02 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
The jq builtin now handles input the way jq 1.7/1.8 does:
inputandinputspull the next values. With-n, the filter runs once on null and the whole stream goes toinput/inputs. When the stream is empty,inputfails with "No more inputs".jq: error: Could not open file X: ..., the other files are still processed, and the exit code is 2.jq: error (at <stdin>:N): ...(orfile:N) and processing continues with the next input. The exit code is 5.error("msg")prints unquoted. A non-string thrown value prints(not a string): <json>.-eexit status follows the last output.-son empty input gives[].Why
Adopted from the pseudo-linus Debian oracle bench, where these were the most common jq mismatches against real jq.
Before
After
Risk
Low to medium. The change is limited to jq input handling and error formatting. The size-limit error path is unchanged.
Checklist
cargo clippy -D warnings,cargo fmtjq.md) and knowledge log updatedhttps://claude.ai/code/session_01VscpEzxtqpCKx5eRMpywNj
Generated by Claude Code