mix mutare.install (mutare v0.1.0)

Copy Markdown View Source

Install Mutare and auto-configure its framework integrations.

mix igniter.install mutare

Adds :mutare to your :dev/:test dependencies (runtime: false), then looks at what your project already depends on and wires up the matching companion packages — so a Plug/Phoenix/Ecto/Oban/Decimal/Swoosh/Gettext app gets framework-aware mutants without any manual configuration:

Detected dependencyPackage addedWired into
:plug / :bandit / :plug_cowboy / :phoenixmutare_plug:mutatorsMutare.Plug.all/0
:phoenixmutare_phoenix:mutatorsMutare.Phoenix.all/0; :extensionsMutare.Phoenix
:phoenix_live_viewmutare_phoenix_live_view:mutatorsMutare.Phoenix.LiveView.all/0
:ecto_sql / :phoenix_ecto / :ectomutare_ecto:mutators{Mutare.Ecto, repo: YourRepo}
:oban / :oban_promutare_oban:mutatorsMutare.Oban.all/0
:decimalmutare_decimal:mutatorsMutare.Decimal.all/0
:swoosh / :phoenix_swooshmutare_swoosh:mutatorsMutare.Swoosh.all/0
:phoenix_swooshmutare_phoenix_swoosh:mutatorsMutare.Phoenix.Swoosh.all/0
:gettextmutare_gettext:extensionsMutare.Gettext

Each detected package is added as a :dev/:test dependency and wired into a generated .mutare.exs: a mutator package extends the :mutators list (alongside the :builtins group token, which keeps Mutare's own families on), while a non-mutating extension like mutare_gettext — which only teaches Mutare a library's compile-time vocabulary so the built-in mutators land on it correctly — joins the :extensions list. mutare_phoenix does both: its families join :mutators, and its front module — a Mutare.CallRouting extension that keeps Phoenix's compile-time macros (the router DSL, ~H) out of the mutation set — joins :extensions. Nothing detected? You still get a starter .mutare.exs and a ready-to-run mix mutare.

If you already have a .mutare.exs, it is left untouched and the recommended :mutators / :extensions keys are printed as a notice for you to merge in by hand.

Options

  • --repo MyApp.Repo — the Ecto repo to configure mutare_ecto with. When omitted the repo is detected from your project (you are prompted if there is more than one); if none is found a YourApp.Repo placeholder is written and a warning tells you to edit it.