Skip to content

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

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#6
lostbean merged 1 commit into
mainfrom
chore/remove-dialyzer

Conversation

@lostbean

Copy link
Copy Markdown
Owner

Why

Retiring Dialyzer across the libs. Elixir 1.20's built-in set-theoretic
(gradual) type checker runs automatically during mix compile, so the
Dialyzer static-analysis gate is replaced with an explicit compile-time
type-check gate.

What was removed

  • mix.exs — the {:dialyxir, "~> 1.4", ...} dev/test dependency.
  • mix.exs — the dialyzer: project config block (plt_file: {:no_warn, "priv/plts/dialyzer.plt"}).
  • mix.lock — the now-orphaned dialyxir and erlex entries (pruned surgically via mix deps.unlock dialyxir erlex; no other lock entries touched).
  • .github/workflows/ci.yml — the Run Dialyzer step. There was no separate PLT cache step to remove (PLTs lived under the gitignored priv/plts/ and were covered by the generic Mix cache).
  • lib/agent_obs/req_llm.ex — the in-code @dialyzer {:nowarn_function, trace_tool_execution: 3} attribute (and reworded its companion comment to drop the Dialyzer reference; runtime behavior unchanged).
  • README.md / DEVELOPMENT.md — Dialyzer usage/troubleshooting docs, updated to describe the compile-time type checker instead.

What was added (the replacement gate)

  • .github/workflows/ci.yml — the existing compile step now runs
    mix compile --warnings-as-errors --force and is relabeled
    "Compile project (type-check gate)", with a comment noting it
    replaces Dialyzer. The set-theoretic type checker's findings surface as
    compile warnings, and --warnings-as-errors fails CI on them.

Did the type checker surface anything new?

No. Removing the @dialyzer :nowarn_function attribute on
trace_tool_execution/3 did not produce any new type warning under the
1.20 checker — mix compile --warnings-as-errors --force is clean with zero
warnings.

Verification (inside the Nix flake — Elixir 1.20.1 / OTP 28)

  • mix deps.get — OK; lockfile drops dialyxir + erlex.
  • mix compile --warnings-as-errors --forceclean, zero warnings.
  • mix format --check-formatted — clean.
  • mix credo — no issues (261 mods/funs, 22 files).
  • mix test230 passed, 8 excluded (integration tag, excluded by default).

Known limitations / blockers

None. All gates green locally.

Elixir 1.20's built-in set-theoretic (gradual) type checker runs during
mix compile, replacing Dialyzer's static analysis. Replace the Dialyzer
gate with an explicit compile-time type-check gate.

Removed:
- mix.exs: the :dialyxir dev/test dependency
- mix.exs: the dialyzer: project config (plt_file)
- mix.lock: dialyxir and erlex entries
- .github/workflows/ci.yml: the "Run Dialyzer" step
- lib/agent_obs/req_llm.ex: the @dialyzer :nowarn_function attribute
- README.md / DEVELOPMENT.md: Dialyzer usage docs

Added:
- ci.yml: compile step now runs with --warnings-as-errors --force and is
  labeled the type-check gate; the type checker's findings surface as
  compile warnings and fail CI.
@lostbean lostbean merged commit c626c34 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