Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ bench: ## Run benchmarks
bench-parser: ## Run parser-only benchmark
$(DUNE) exec benchmarks/bench_parser.exe

.PHONY: bench-execution
bench-execution: ## Compare prepared execution with the interpreter in-process
$(DUNE) exec --root . --profile=release benchmarks/bench_execution.exe

.PHONY: release
release: ## Create a new release (usage: make release VERSION=1.2.3)
@if [ -z "$(VERSION)" ]; then \
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Arguments:

Options:
-r, --raw-output Output strings without quotes
--stream-output Flush each result as it is produced
--no-color Disable colored output
--repl Start interactive REPL mode
-v, --verbose Show verbose output including deprecation warnings
Expand All @@ -156,6 +157,24 @@ Options:
--help Print help
```

By default, all output is written at once after the query succeeds, and an
error shares stdout with any results. With `--stream-output`, each result is
flushed to stdout as it is produced. If a later result or input tail fails,
earlier output on stdout remains, the error is written to stderr instead, and
the process exits with status 1. Successful output is identical in both modes;
a query with no results prints one empty line. This flag has no effect in REPL
mode.

Both modes execute complete items before EOF for supported root or direct
root-member iteration; without `--stream-output` the results are held until the
query has succeeded. Collection barriers, unsupported queries and `--debug`
validate the complete JSON input first. After a query error, callbacks stop and input validation continues.
A later input error wins. Invalid JSON also takes precedence over an invalid query.
The debug AST prints only after valid EOF.
For supported queries that start with a root object key, file, inline, and stdin
input can retain only the selected value while validating the rest. Other queries
retain the complete input. The JavaScript string entry remains validation-first.

## Contributing

Contributions are welcome! See the [development setup](#development) below to get started.
Expand Down
169 changes: 169 additions & 0 deletions benchmarks/README.md

Large diffs are not rendered by default.

Loading
Loading