Skip to content

Releases: AntonLydike/filecheck

v1.0.1 - Relicense to Apache and some bugfixes

07 Sep 13:45
Compare
Choose a tag to compare

What's Changed

With this version, filecheck officially changes their license to the apache2, to keep in spirit of other LLVM projects.

New Contributors

Full Changelog: v1.0.0...v1.0.1

v1.0.0 - A Proper Release

14 Jul 17:44
Compare
Choose a tag to compare

What's Changed

  • regex: Fix negative sets capturing newlines by @AntonLydike in #15
  • regex: Syntax fixes for a bunch of stuff (fixes #4, #12) by @AntonLydike in #16
  • core: Warn on empty captures instead of throwing errors by @AntonLydike in #17
  • Add support for --check-prefixes (fixes #13) by @AntonLydike in #18
  • Better error messages, now also printing possible intended matches
  • Fix uses of bare regex "or" (|) (#3)

This release also marks a rename to filecheck, from the former filecheck-ng. The owners of filecheck have graciously transferred their PyPi package name to this project.

Full Changelog: v0.1.2...v1.0.0

v0.1.2 - More Better Support

09 Jul 09:37
Compare
Choose a tag to compare

This release contains:

  • Fixes to CHECK-LABEL to now be in-line with upstream (#1)
  • The added --allow-empty flag

With this we are able to pass 1530 out of 1645 (93%) of LLVMs MLIR filecheck tests.

v0.1.1

07 Jul 18:23
Compare
Choose a tag to compare

We got 'em all!

First release with more-or-less all of FileChecks CHECK-* features covered. Still missing lots of other flags, and currently tracking an inconsistency with how FileCheck handles CHECK-LABEL, but otherwise pretty happy with this one!

Here's an excerpt from the README specifying features:

Features:

Here's an overview of all FileCheck features and their implementation status.

  • Checks:
    • CHECK
    • CHECK-NEXT
    • CHECK-NOT
    • CHECK-LABEL #1
    • CHECK-EMPTY
    • CHECK-SAME
    • CHECK-DAG
    • CHECK-COUNT
  • Flags:
    • --check-prefix
    • --check-prefixes
    • --comment-prefixes
    • --allow-unused-prefixes
    • --input-file
    • --match-full-lines
    • --strict-whitespace (Kinda? Seems to be working.)
    • --ignore-case
    • --implicit-check-not
    • --dump-input
    • --dump-input-context
    • --dump-input-filter
    • --enable-var-scope
    • -D<VAR=VALUE>
    • -D#<FMT>,<NUMVAR>=<NUMERIC EXPRESSION>
    • -version
    • -v
    • -vv
    • --allow-deprecated-dag-overlap Not sure what this means yet.
    • --allow-empty (I think I allow empty input rn?)
    • --color No color support yet
  • Base Features:
    • Regex patterns
    • Captures and Capture Matches
    • Numeric Captures
    • Numeric Substitutions (jesus christ, wtf man)
    • Literal matching (CHECK{LITERAL})
    • Weird regex features ([:xdigits:] and friends)
    • Correct(?) handling of matching check lines
  • Testing:
    • Base cases
    • Negative tests
    • Error messages (started)
    • Lots of edge cases
    • MLIR/xDSL integration tests
  • UX:
    • Good error messages: I have some error messages, but could be a lot better
      • Parse errors
      • Matching errors
      • Malformed regexes
  • Infrastructure:
    • Formatting: black
    • Pyright
    • pre-commit
    • CI for everything

We are open to PRs for bugfixes or any features listed here.

Differences to LLVMs FileCheck:

We want to be as close as possible to the original FileCheck, and document our differences very clearly.

If you encounter a difference that is not documented here, feel free to file a bug report.

Better Regexes

We use pythons regex library, which is a flavour of a Perl compatible regular expression (PCRE), instead of FileChecks
POSIX regex falvour.

Example:

// LLVM filecheck:
// CHECK: %{{[:alnum:]+}}, %{{[:digit:]+}}

// our fileheck:
// CHECK: %{{[a-zA-Z0-9]+}}, %{{\d+}}

Some effort is made to translate character classes from POSIX to PCRE, although it might be wrong in edge cases.

Relaxed Matchings:

We relax some of the matching rules, like:

  • Allow a file to start with CHECK-NEXT

No Numerical Substitution

While our filecheck supports numeric capture
([[#%.3x,VAR:]] will capture a three-digit hex number), we don't support arithmetic expressions on these captured
values at the moment. We also don't support the "Pseudo Numeric Variable" @LINE.

Special Feature Flags:

This version of filecheck implements some non-standard extensions to LLVMs filecheck. These are disabled by default but
can be enabled through the environment variable FILECHECK_FEATURE_ENABLE=.... Avialable extensions are documented here:

  • MLIR_REGEX_CLS: Add additional special regex matchers to match MLIR/LLVM constructs:
    • \V will match any SSA value name (without the %)