Skip to content

chore: remove Dialyzer in favor of the built-in type checker#3

Merged
lostbean merged 1 commit into
mainfrom
chore/remove-dialyzer
Jun 17, 2026
Merged

chore: remove Dialyzer in favor of the built-in type checker#3
lostbean merged 1 commit into
mainfrom
chore/remove-dialyzer

Conversation

@lostbean

Copy link
Copy Markdown
Owner

Retires Dialyzer in favor of Elixir 1.20's built-in set-theoretic (gradual) type checker, which runs automatically during mix compile.

What was removed

  • {:dialyxir, "~> 1.4", only: [:dev], runtime: false} from mix.exs.
  • Unused lockfile entries pruned via mix deps.unlock --unused: dialyxir, erlex (its dep), plus stale orphans elixir_make and inflex.
  • No dialyzer mix alias, .dialyzer_ignore.exs, or committed PLT existed — nothing else to remove.

Replacement gate

The existing CI "Compile project" step already ran mix compile --warnings-as-errors. It's now an explicit type-check gate — mix compile --warnings-as-errors --force — with a comment noting it replaces Dialyzer and leans on the 1.20 checker. --force ensures a full recompile so the checker analyzes the whole project, not just changed modules.

Type-checker findings

The prior update pass noted Dialyzer flagged no_return/contract warnings on the @spec changeset(t(), map()) + def changeset(struct \\ %__MODULE__{}, params) default-arg pattern across the Ecto schema type modules (~30 of them). The Elixir 1.20 set-theoretic checker does NOT flag this patternmix compile --warnings-as-errors --force produces zero warnings on acpex's own code. This was a Dialyzer-specific false positive, so no @spec changes were made.

(One unrelated type warning surfaces in the ex_doc dependency during compile; it's in a dep, not acpex, and does not fail the build.)

CI confirmation (run locally inside the Nix flake, Elixir 1.20.1 / OTP 28)

  • mix deps.get + mix deps.unlock --unused — lockfile updated.
  • mix compile --warnings-as-errors --force — clean, zero acpex warnings (exit 0).
  • mix format --check-formatted — clean.
  • mix credo — no issues (381 mods/funs, 73 files).
  • mix test — 197 passed (11 properties, 186 tests), 8 excluded (:claude_code_acp, excluded by default as expected); exit 0.

Retire Dialyzer now that Elixir 1.20's built-in set-theoretic (gradual)
type checker runs automatically during `mix compile`.

- Drop the {:dialyxir, ...} dev dependency from mix.exs.
- Prune the unused lockfile entries (dialyxir, erlex, and stale
  elixir_make/inflex orphans) via `mix deps.unlock --unused`.
- Make the CI compile step an explicit type-check gate:
  `mix compile --warnings-as-errors --force`, so the 1.20 checker sees
  the whole project and any type/compile warning fails the build.

No dialyzer mix alias, .dialyzer_ignore.exs, or committed PLT existed.
The set-theoretic checker does NOT flag the changeset/1 @SPEC +
default-arg pattern that Dialyzer previously complained about, so no
spec changes were needed.
@lostbean lostbean merged commit d7a0834 into main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant