You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add options testament spec; this generalizes targets, cmd, and matrix. In particular, this allows specifying different options per backend, where some option combinations would either be non-meaningful for a backend or redundant, avoiding combinatorial explosion.
allows testing other backends without having to jump through hoops (eg --threads:on currently breaks js, refs js should ignore threads:on Nim#17267)
implementation
testament will then run:
$nim $options $flags $file
where $options is already defined in testament as default options to use; note that $flags can override those
alternative
allow multiple cmd entries (currently only 1 possible)
```nim
discard """ cmd: “$nim c $options $file" cmd: “$nim c --threads:on $options $file" cmd: “$nim js $options $file""""doAsserttrue
but cmd in most cases would have the redundant prefix $nim and $options $file, so flags is IMO a simple but useful sugar.
note that we can still also support multiple cmd entries, for those cases where the cmd to run doesn't fit a pattern like “$nim c $options $file" (eg: no $options, or arguemnts after $file, etc)
The text was updated successfully, but these errors were encountered:
timotheecour
changed the title
testament: add options (more flexible than matrix, cmd, targets)
testament: add flags (more flexible than matrix, cmd, targets)
Mar 6, 2021
I prefer the flags, however multiple cmd have their own advantage, we can then test for both nim c and nim check, for example. We should do whatever is easier to implement IMHO.
proposal
add
options
testament spec; this generalizestargets
,cmd
, andmatrix
. In particular, this allows specifying different options per backend, where some option combinations would either be non-meaningful for a backend or redundant, avoiding combinatorial explosion.example
benefits
implementation
testament will then run:
where
$options
is already defined in testament as default options to use; note that$flags
can override thosealternative
allow multiple
cmd
entries (currently only 1 possible)but
cmd
in most cases would have the redundant prefix$nim
and$options $file
, soflags
is IMO a simple but useful sugar.note that we can still also support multiple
cmd
entries, for those cases where the cmd to run doesn't fit a pattern like“$nim c $options $file"
(eg: no$options
, or arguemnts after$file
, etc)The text was updated successfully, but these errors were encountered: