Releases: benhoyt/goawk
v1.27.0: allow redirection to /dev/stderr on Windows, more
What's changed
- Fix wrong precedence of 'expr | getline' expressions by @fioriandrea in #216
- Use C.UTF-8 as locale when invoking external awk program by @guilherme-puida in #226 (first-time contributor)
- New feature: Make redirecting to /dev/stderr work on Windows by @benhoyt in #225
Full Changelog: v1.26.0...v1.27.0
v1.26.0
What's Changed
- Fix rare race in pipe-to-command close() result test by @juster in #213
- Fix #190: FS regex [^,]* fails on empty field by @fioriandrea in #214
- Fix issue #79: Incorrect parsing of complex ++ expressions by @fioriandrea in #215
- Allow optional newline between "do {}" and "while" by @benhoyt in #220
- Distinguish between /regexp/ and "regexp" in stringified output by @ypdn in #222
New Contributors
Full Changelog: v1.25.0...v1.26.0
v1.25.0: PGO, better exit codes, \u escape
This release includes several minor changes:
- Build binaries with PGO on Go 1.21. GoAWK on Go 1.21 is about 10% faster than on Go 1.20, and PGO makes it another 5-6% faster.
- Bumps up the minimum supported Go version from 1.15 to 1.16.
- Makes the return value of
system()
andclose()
for pipes more closely match Gawk's. Internal refactoring of the input and output stream implementation to make this happen. See issues #203 #204 #205 and thanks @juster! - Support the
\u
Unicode string escape that's been added to onetrueawk and Gawk recently. #212
Version 1.24.0: --csv and bug fixes
This release contains several minor fixes and the addition of --csv
(it's an alias for -i csv
). This is for compatibility with onetrueawk and Gawk, which are both adding that option soon.
It also contains a minor backwards-incompatible change: in CSV input mode (-i csv
), the behaviour of the two-argument form of split()
now parses using CSV splitting, rather than FS. This is also in line with the upcoming --csv
feature of onetrueawk and Gawk. This is very unlikely to affect anyone, as CSV mode is relatively recent, and it seems unlikely that anyone is using the two-argument form of split()
in CSV mode in any case.
Full list of changes:
- Allow
{ blocks }
with just semicolons in them in #192 -- thanks @raygard for the bug report - Ensure
exit
without status code doesn't set exit code in #193 -- thanks @raygard for the bug report - Make two-argument
split()
respect CSV input mode in #198 - Add
--csv
option, in line with upcoming AWK and Gawk feature in #199 - Update CSV doc to mention
--csv
in #200 - Wait for command to finish when a pipe is closed in #201 -- thanks @xonixx for the bug report
Version 1.23.3
Version 1.23.2
Version 1.23.1
This is a patch release that fixes a bug in 1.23.0 -- there was a bug that caused a panic in the resolver step with code like function f1(A) {} function f2(x, A) { x[0]; f1(a); f2(a) }
. Fixed in #178.
While we're at it, also fix a panic with certain obscure regexes (#179) and limit ARGC
to a reasonable maximum (#180).
All three of these issues were found by fuzzing: go test ./interp -fuzz=FuzzSource
Version 1.23.0
This release adds a single new feature: support for length(array)
in addition to length(string)
(#176). Calling length()
on an array is quite useful and is supported by all other awk versions (onetrueawk, Gawk, mawk, busybox awk, frawk). In addition, it's been accepted for inclusion into POSIX, though not yet added to the main spec (which seems to take forever).
This release also includes a complete rewrite of the type resolver (#175). Before the code was quite messy and hard to read, now with the two passes I think it's easier to understand and work with. It was certainly easier to add the length(array)
feature with the rewritten resolver than before.
Version 1.22.0
A fairly minor release, fixing some edge cases and adding support for nextfile
:
- Make constructs like
$++lvalue
not an error (#168) - Optimize constant integer array indexes to avoid
toString()
at runtime (#169) - Allow parsing of
cond && var=value
and similar expressions (#170) - Add GroupingExpr to fix
(a)++b
parsing issue; pretty-print precedence (#172) - Add support for
nextfile
(#173)
See full list of commits.
Version 1.21.0
Significant changes in this release:
- Added code coverage support! Thanks, @xonixx, for the idea and implementation.
- Made
-d
,-da
, and-dt
print to stdout and exit (#155). Thanks, @xonixx. - Allowed semicolon as terminator for normal pattern without action. Thanks @juntuu for the bug report and fix.
- Bumped minimum Go version to 1.15.