Skip to content

0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Aug 17:50
2ff48db

We are happy to announce the release of uu_grep 0.2.0 - a release focused on
GNU compatibility and on shipping binaries. This cycle turned the
differential fuzzer and the GNU test suite into a steady source of fixes: bracket
expressions, zero-width matches, exit codes and stdin handling all moved closer to
GNU, and uu_grep is now published as prebuilt binaries for Linux, macOS and
Windows.

GNU test suite compatibility

Result 0.1.0 0.2.0 Change
Pass 75 78 +3
Skip 21 21 0
Fail 32 29 -3
Error 0 0 0

Out of 128 GNU grep tests.

GNU testsuite evolution

Highlights

Matching and regex

  • Misspelled character classes such as [:space:] used outside a bracket expression
    are now rejected (#100), and reversed bracket ranges report GNU's
    "Invalid range end" (#71).
  • Leading ERE repeat operators warn (#48), conflicting matcher flags are rejected (#47),
    and multiple patterns with -P/--perl-regexp are refused like GNU (#40).
  • Multi-character case folds are avoided, so -i matches GNU byte-for-byte (#54).
  • Zero-width matches are selected under -w and -x (#52) and handled at EOF
    under -o (#44).
  • . matches newline in null-data mode (#45), and GNU's buffer anchors are
    honored (#56).

Options and output

  • Exit 2 when a -f or --exclude-from file cannot be read (#102).
  • Seekable stdin is rewound when -m stops the search early, so a following reader
    sees the same bytes GNU leaves behind (#101).
  • -m 0 (#46) and inverted empty patterns (#43) short-circuit.
  • -o overrides context arguments (#72), and no separator is emitted between
    adjacent context groups (#42).
  • -q yields exit 0 on a match even after a file error (#11) and suppresses EOF
    output (#41).
  • Invalid UTF-8 text is kept under -I (#49), and the -T alignment tab is no longer
    emitted on empty lines (#12).
  • GREP_COLORS mt is supported, and the deprecated GREP_COLOR warns (#70).

Packaging

  • Prebuilt binaries via cargo-dist for x64/ARM64 Linux, Intel and Apple Silicon macOS,
    and x64 Windows (#93), plus cargo-binstall metadata (#103) - see the download
    table below.
  • Releases are created as drafts, with the tag checked against the Cargo.toml
    version (#111).

Infrastructure

  • A differential fuzzer runs uu_grep and GNU grep on the same input and panics on any
    divergence (#7); most of the compatibility fixes above came from it.
  • Renovate keeps dependencies current (#74): uucore/uutests 0.10.0, clap 4.6.6,
    memchr 2.8.3, criterion 5.
  • A flaky-test race against grep's early exit on stdin was fixed (#94).

Known limitations

Locale and encoding are still not honored (non-UTF-8 matches are treated as binary),
there is no localization yet, and performance still has room to improve - see the
README for the current list.


What's Changed

  • grep: select zero-width matches under -w and -x by @wondr-wclabs in #52
  • fix: reject multiple patterns when -P/--perl-regexp is used by @koopatroopa787 in #40
  • grep: don't emit the -T alignment tab on empty lines by @sylvestre in #12
  • perf: buffer-at-a-time search for literal patterns by @sylvestre in #16
  • fuzz: add differential fuzzer against GNU grep by @sylvestre in #7
  • grep: keep invalid UTF-8 text under -I by @wondr-wclabs in #49
  • grep: let dot match newline in null-data mode by @wondr-wclabs in #45
  • grep: suppress EOF output in quiet mode by @wondr-wclabs in #41
  • grep: cover zero-width EOF only-matching behavior by @wondr-wclabs in #44
  • grep: honor GNU buffer anchors by @wondr-wclabs in #56
  • uufuzz: simplify pipe() code by @oech3 in #58
  • uufuzz: simplify by @oech3 in #59
  • remove eprintln! to avoid SIGABRT by @oech3 in #62
  • CONTRIBUTING.md: replace coreutils by grep by @oech3 in #63
  • grep: avoid separators for adjacent context groups by @wondr-wclabs in #42
  • grep: reject conflicting matcher flags by @wondr-wclabs in #47
  • grep: warn on leading ERE repeat operators by @wondr-wclabs in #48
  • grep: -q match yields exit 0 even after a file error by @sylvestre in #11
  • grep: short-circuit inverted empty patterns by @wondr-wclabs in #43
  • grep: short-circuit max-count zero by @wondr-wclabs in #46
  • grep: support GREP_COLORS mt and warn on deprecated GREP_COLOR by @sylvestre in #70
  • Add renovate.json by @cakebaker in #74
  • grep: make '-o' override context arguments by @Froloket64 in #72
  • matcher: report reversed bracket ranges as GNU's "Invalid range end" by @sylvestre in #71
  • chore(deps): update rust crate clap to v4.6.4 by @renovate[bot] in #77
  • chore(deps): update rust crate glob to v0.3.4 by @renovate[bot] in #78
  • chore(deps): update actions/checkout action to v7 by @renovate[bot] in #83
  • chore(deps): update github artifact actions (major) by @renovate[bot] in #84
  • fix(deps): update rust crate uucore to 0.9.0 by @renovate[bot] in #82
  • chore(deps): update rust crate uutests to 0.9.0 by @renovate[bot] in #81
  • chore(deps): update codecov/codecov-action action to v7 by @renovate[bot] in #86
  • chore(deps): update actions/github-script action to v9 by @renovate[bot] in #85
  • chore(deps): update dawidd6/action-download-artifact action to v21 by @renovate[bot] in #87
  • chore(deps): update rust crate criterion to v5 by @renovate[bot] in #89
  • chore(deps): update moonrepo/setup-rust action to v1 by @renovate[bot] in #88
  • chore(deps): update rust crate memchr to v2.8.3 by @renovate[bot] in #80
  • chore(deps): update codspeedhq/action action to v5 by @renovate[bot] in #90
  • chore(deps): update mozilla-actions/sccache-action action to v0.0.11 by @renovate[bot] in #91
  • chore(deps): update rust crate clap to v4.6.5 by @renovate[bot] in #92
  • grep: fix flaky tests racing grep's early exit on stdin by @sylvestre in #94
  • fix(deps): update rust crate uucore to 0.10.0 by @renovate[bot] in #96
  • chore(deps): update rust crate uutests to 0.10.0 by @renovate[bot] in #95
  • chore(deps): update rust crate clap to v4.6.6 by @renovate[bot] in #97
  • add cargo dist to ship binaries by @sylvestre in #93
  • grep: avoid multi-character case folds by @wondr-wclabs in #54
  • grep: rewind seekable stdin when -m stops the search early by @sylvestre in #101
  • grep: reject misspelled character classes like [:space:] by @sylvestre in #100
  • grep: exit 2 when a -f or --exclude-from file cannot be read by @sylvestre in #102
  • grep: add cargo-binstall metadata by @sylvestre in #103
  • prepare version 0.2.0 by @sylvestre in #104
  • chore(deps): update dawidd6/action-download-artifact action to v23 by @renovate[bot] in #105
  • chore(deps): update dawidd6/action-download-artifact action to v24 by @renovate[bot] in #110
  • ci: create the GitHub release as a draft and check tag vs Cargo.toml version by @sylvestre in #111

New Contributors

Full Changelog: 0.1.0...0.2.0

Download uu_grep 0.2.0

File Platform Checksum
uu_grep-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
uu_grep-x86_64-apple-darwin.tar.xz Intel macOS checksum
uu_grep-x86_64-pc-windows-msvc.zip x64 Windows checksum
uu_grep-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
uu_grep-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum