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
--events FILE (events: in .mutare.exs) writes a JSON-lines record of a run as it
goes: a start, the scanned mutant count, each phase, one mutant line per verdict
(location, family, variant labels, status, timing, the patch as original and replacement over a source range, and the count of verdicts so far), and a closing finish that says why the run stopped and carries its counts and score, or the error and
its message. The finish line comes after the reports are written. Mutare.Report.Events documents the format.
Mutare.Run.Context.listen/3 adds a listener to a run hook beside the one already bound,
and Mutare.Score.score_counts/1 scores a tally of statuses rather than a result list.
The human report's score line names the flags that scoped the run — --since, --only, --exclude, --line, --max-mutants — as — scoped by --since main, so a
score over part of the project does not read as the project's.
Mutare.CallRouting.Call.resolved_module/2 reads __MODULE__ as the module a routed
call is written in, and __MODULE__.Comment as a name beneath it, so a classifier can
tell what from(p in __MODULE__, …) names inside a schema module. At a file's top level __MODULE__ is :error and __MODULE__.Comment is Comment, as the compiler reads
them; in a module whose name is computed (defmodule Module.concat(…)) both are :error. Call.new/5 takes enclosing_module: for tests.
With --partition-db/--partition-env, a run warns about a partition whose
environment is broken — a missing or unmigrated database, say. Only partition 1 is
checked before the mutants run, so such a partition's failures used to count as kills
without a word. After the run, each other partition's fastest kill has its tests rerun
there with no mutant active, announced on the live display. The warning fires if they
fail (on every --kill-runs attempt) or the application won't start, while the same
tests pass on partition 1. If they fail on partition 1 too, a different warning says
they fail when run on their own. The partitions found are Mutare.Run's :broken_partitions; the human report lists them, the JSON report gives each kill on
one a statusReason, the SARIF report adds a tool execution notification, and a --min-score gate fails. Mutare.Result records the partition each run used, and the
JSON report gives each mutant its partition.
Every sandbox mix has MUTARE_PROJECT_ROOT set to the absolute path of the project
it copies. A config that derives something from where the project lives — a test
database per git worktree, named from the checkout's path or branch — can read it
instead of the sandbox's own path, which lies under the system temp directory and has
no .git.
Fixed
An --exclude (or exclude:) entry naming a directory excluded nothing, since only a
file the glob matched itself was dropped; --exclude lib/legacy now excludes every file
under lib/legacy, as --only lib/legacy includes them.
A defimpl P do … end written inside a module, with no for:, implements P for that
module, as the compiler infers it. Mutare now does the same: a use in its body is
expanded, :skip_lifting names its functions under P.Module, and __MODULE__ in a
routed call's arguments reads as P.Module. Before, the impl module was left unknown.
alias __MODULE__.Sub (and alias __MODULE__, alias __MODULE__.{A, B}, the as:
forms, require __MODULE__.Sub, as: S) now binds its name to the module beneath the one
it is written in. Before, it was ignored and the short name read as written: under alias __MODULE__.Enum, Enum.filter was mutated as the standard library's, and a call
route, argument mark, @behaviour or use reached through such an alias, or a module a
routed call's argument names through one, was read as the wrong module. In a module
whose name is computed, the alias still binds nothing.
__MODULE__ now names the module it is written in everywhere Mutare reads a module
name: a call's receiver (__MODULE__.go(x), __MODULE__.Sub.run(x), and their
captures), an import, use or @behaviour target, and a defprotocol or defimpl
head or for:. Before, each was left unresolved, so a call route or argument mark
keyed on that module did not apply, an import through it stamped no calls, and its use was not expanded.
defmodule __MODULE__.Sub names Parent.Sub, as the compiler reads it. Before, Mutare
treated the head as computed, so it left every use in the module unexpanded and
resolved no __MODULE__ or nested module name inside it.
An @behaviour in a module nested inside a defimpl body now resolves a sibling's short
name beneath the impl module (P.T.Cb), as the compiler does. Before, it resolved beneath
the module around the defimpl (Outer.Cb), so a behaviour-gated mutator could miss it.
A use in an inline defimpl P, for: T, do: (use M) is now expanded with P.T as its
caller, as in the do … end form. Before, it was left unexpanded.