Releases: emilkarlen/exactly
Type `files-source` for populating a directory
Type files-source
for populating a directory
The new type files-source
can populate a directory of arbitrary structure.
Breaking syntax changes
This version is not backwards compatible.
Complete list of changes
Improved env vars, renamed types, and more
Improved environment variables
Environment variables can be manipulated individually for the "act" phase and other phases.
env -of act ...
env -of !act ...
Renamed types
string-matcher
-> text-matcher
string-transformer
-> text-transformer
Breaking syntax changes
This version is not backwards compatible.
Complete list of changes
stdin for arbitrary programs, and more (including breaking changes)
Set stdin for arbitrary programs via new option -stdin
The contents of stdin is given as a STRING-SOURCE
.
Improved filtering on line numbers
The new string-transformer
filter -line-nums
selects lines given line numbers in a syntax resembling Python slices.
This makes it possible to reference lines from the end, among other things.
Breaking syntax changes
This version is not backwards compatible.
Complete list of changes
actor/command line: Executes PROGRAM
Added
- Builtin symbol - string
LINE_SEP
- Builtin symbol - string
TAB
Changed
- Actor
command-line
- Executes aPROGRAM
Fixed
- Type
files-matcher
/matches -full
- Crash rendering err msg for recursive model w too few files. - Test - tests not working for CWD=/ or CWD=/sub
- Test - tests not working for Python >= 3.8 (comparison of XML-strings generated from objects with dicts)
Adds `run PROGRAM` for matchers and transformers
Adds
- Type
file-matcher
- primitiverun PROGRAM
- Type
string-matcher
- primitiverun PROGRAM
- Type
string-transformer
- primitiverun PROGRAM
- Instruction
file
--ignore-exit-code
option - Instruction
run
--ignore-exit-code
option
FILES-CONDITION for checking contents of directories
Adds
- Type
FILES-CONDITION
- File matcher
dir-contents
:matches [-full] FILES-CONDITION
For example
dir-contents some-dir matches -full
{
a.txt
b.txt : type file
sub1 : type dir && dir-contents matches -full
{
c.txt : type file && @[SOME_MATCHER]@
}
sub2 : type dir && matches @[SOME_FILES_CONDITION]@
sub3 : @[SOME_FILE_MATCHER]@
}
where
def file-matcher SOME_MATCHER = ...
def files-condition SOME_FILES_CONDITION = ...
def files-matcher SOME_FILE_MATCHER = ...
Standard operators for all matchers. file-matcher/dir-contents with recursion
Standard matcher operators
Makes all matcher types support the standard operators:
- !
- &&
- ||
file-matcher
- New
dir-contents
, with recursion - New
-prune
option
Recursion also added to instruction dir-contents
Symbol definition
RHS is now mandatory for all types.
Introduced constant
matcher and identity
string-transformer, for completeness.
Improved error messages & symbols inspection
Messages for errors involving matchers, string-transformers and programs
Error messages includes a trace of the matcher evaluation, and the structure description of string-transformers and programs.
Symbol inspection
The symbol
command is able to display the structure and resolved value of symbols.
Code base
Lots of simplifications, most of them related to matchers.
Bug fixes and improved help text
Fixes some bugs related to error reporting, and help text.
The "exists" assertion may apply a "FILE-MATCHER"
E.g.
exists -file f.txt
is replaced by
exists f.txt : type file