chore: remove Dialyzer in favor of the built-in type checker#6
Merged
Conversation
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.
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.
Why
Retiring Dialyzer across the libs. Elixir 1.20's built-in set-theoretic
(gradual) type checker runs automatically during
mix compile, so theDialyzer 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— thedialyzer:project config block (plt_file: {:no_warn, "priv/plts/dialyzer.plt"}).mix.lock— the now-orphaneddialyxiranderlexentries (pruned surgically viamix deps.unlock dialyxir erlex; no other lock entries touched)..github/workflows/ci.yml— theRun Dialyzerstep. There was no separate PLT cache step to remove (PLTs lived under the gitignoredpriv/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 runsmix compile --warnings-as-errors --forceand 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-errorsfails CI on them.Did the type checker surface anything new?
No. Removing the
@dialyzer :nowarn_functionattribute ontrace_tool_execution/3did not produce any new type warning under the1.20 checker —
mix compile --warnings-as-errors --forceis clean with zerowarnings.
Verification (inside the Nix flake — Elixir 1.20.1 / OTP 28)
mix deps.get— OK; lockfile dropsdialyxir+erlex.mix compile --warnings-as-errors --force— clean, zero warnings.mix format --check-formatted— clean.mix credo— no issues (261 mods/funs, 22 files).mix test— 230 passed, 8 excluded (integration tag, excluded by default).Known limitations / blockers
None. All gates green locally.