ref:552f599224a0d3eb23233de6763625474bf9f6ff

Enforce Dialyzer in CI (#1)

## Summary - Fix all 4 existing Dialyzer warnings (type mismatches in diff.ex, pack/reader.ex, protocol/receive_pack.ex) - Add `mix dialyzer` step to `.anvil.yml` CI pipeline - Any new Dialyzer warning now fails the build Closes #20 ## Changes - **diff.ex**: `diff_blobs` spec was missing the `{:ok, :binary, sizes}` return variant - **pack/reader.ex**: Exposed `read_object/4` with external resolver param, making the REF_DELTA code path reachable (previously dead code) - **protocol/receive_pack.ex**: Added missing `pre_receive_hook` and `cmd_buffer` fields to `state()` type; targeted `@dialyzer {:no_opaque, init: 2}` for known MapSet opaque type limitation - **.anvil.yml**: Added dialyzer CI step depending on compile ## Test plan - [x] `mix dialyzer` passes with 0 errors locally - [x] `mix compile --warnings-as-errors` passes - [x] `mix format --check-formatted` passes - [x] `mix test` — 529 tests, 0 failures
SHA: 552f599224a0d3eb23233de6763625474bf9f6ff
Author: Anvil <noreply@anvil.fangorn.io>
Date: 2026-04-09 04:35
Parents: ee9b4d1
4 files changed +31 -1
Type
.anvil.yml +7 −0
@@ -21,6 +21,13 @@
export MIX_HOME=/workspace/.mix
mix format --check-formatted
depends_on: [deps]
- name: dialyzer
run: |
set -e
export MIX_HOME=/workspace/.mix
mkdir -p priv/plts
mix dialyzer
depends_on: [compile]
- name: test
run: |
set -e