v0.6.0
A stream ends at the first record it cannot read, so the next program in
a pipeline never sees a partial result that looks complete, and
--stop-on-error goes away with the choice it offered. jz new KEY:=JSON
returns the same status as the same text read from a file, and the
registry reads what exiftool, identify and pkg-config print: 227 commands
through 600 definitions.
Added
- Four definitions for what three tools print:
exiftool FILE(the tags
one per line) andexiftool -G FILE(the group in front of each of
them),identify FILE...(one record per image, its width and height
typed), andpkg-config --list-all(the modules it knows, read only
when named since a name and a phrase is also what a glossary looks
like). The registry holds 227 commands through 600 definitions.
Fixed
jz new KEY:=JSONreturns 3 rather than 2 when the argument is JSON
and jz refuses what it holds: a key given twice in one object, or
nesting past the depth limit. The same text in a file (KEY:=@f.json)
and the same text read as data (jz --format json) already returned 3,
so a script that built the argument with a command substitution got a
different status from one that passed the file. Text that is not JSON
at all is still 2, since that is the command line being wrong.
Changed
- A stream ends at the first record it cannot read, rather than leaving
the record out and going on.--stream,jz run --streamandjz new --eachall do this, for a command's output, a data file andlinesor
nulalike: the records written before the failure stand, it is
reported once on standard error, nothing after it is read, and the
status is 3. A stream that goes on past a record it dropped reaches the
next program in the pipeline looking complete, since the diagnostic
went to standard error and the status comes only after the records have
been read and acted on.
Removed
--stop-on-errorasked for what every stream now does. A command line
that still names it is refused with exit status 2 and a message saying
so; drop the option and the behaviour is unchanged.engine.Streamno longer takes anonError func(*ParseError) error
besideemit: with one answer to a record that cannot be read there is
nothing to choose. A caller passingniltoday drops the argument and
gets the same reading.