chore: remove Dialyzer in favor of the built-in type checker#3
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}frommix.exs.mix deps.unlock --unused:dialyxir,erlex(its dep), plus stale orphanselixir_makeandinflex..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.--forceensures 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 pattern —mix compile --warnings-as-errors --forceproduces zero warnings on acpex's own code. This was a Dialyzer-specific false positive, so no@specchanges were made.(One unrelated type warning surfaces in the
ex_docdependency 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.