chore: remove stale dialyzer ignores and fix CI PLT caching
All checks were successful
Elixir CI / Build and test (push) Successful in 1m21s
Elixir CI / Dialyzer (push) Successful in 5m44s
Elixir CI / Build and Push Docker Image (push) Successful in 27s

- Remove 5 unnecessary dialyzer ignore entries that no longer match warnings
- Narrow CI dialyzer cache from entire _build to PLT files only
- Add OTP/Elixir versions to cache key to prevent stale PLT on version bumps
- Add restore-keys fallback to GitHub Actions dialyzer cache
This commit is contained in:
Graham McIntire 2026-07-27 16:58:12 -05:00
parent 14d84bef01
commit 7bf0eecfbe
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
3 changed files with 15 additions and 24 deletions

View file

@ -21,10 +21,6 @@
# is called with a tuple that satisfies the runtime contract but violates the opaque type spec
{"lib/aprsme_web/gettext.ex", :call_without_opaque},
# False positive: MapSet.t() is opaque; the @spec is correct at the semantic level but dialyzer
# sees through the opaque wrapper to the underlying map representation
{"lib/aprsme/packets/prepared_queries.ex", :contract_with_opaque},
# False positive: to_float/1 has a %Decimal{} clause for completeness but dialyzer infers
# nil | number() from the call sites in mobile_channel — the clause is defensive dead code
{"lib/aprsme_web/channels/mobile_channel.ex"},
@ -46,16 +42,5 @@
# Mix.Project PLT limitations: Mix.Project.compile_path/0 and
# Mix.Project.config/0 are not present in the dialyzer PLT, and Code.ensure_loaded
# is treated as having an unmatched return when used for side-effect.
{"lib/mix_unused/analyzer.ex"},
# Phoenix LiveViewTest false positive: render_hook/3 and render/1 internally access
# view.ref which only exists on View, but the type specs say Element | View.
# Dialyzer can't narrow the live/3 return type from Element | View to just View.
{"test/aprsme_web/live/map_live/movement_test.ex"},
# Compiler type-checking false positives: these test files use patterns that trigger
# type warnings from the Elixir compiler. All are pre-existing and benign.
{"test/aprsme/packets_mic_e_test.exs"},
{"test/aprsme/packets_test.exs"},
{"test/aprsme/is_test.exs"}
{"lib/mix_unused/analyzer.ex"}
]

View file

@ -74,6 +74,8 @@ jobs:
container: git.mcintire.me/graham/elixir-base:latest
env:
MIX_ENV: dev
OTP_VERSION: "29.0"
ELIXIR_VERSION: "1.20"
steps:
- name: Configure git for submodules
@ -85,15 +87,15 @@ jobs:
with:
submodules: recursive
- name: Restore dependency and build caches
- name: Restore PLT cache
uses: https://code.forgejo.org/actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-dialyzer-${{ hashFiles('**/mix.lock') }}
_build/dev/*.plt
key: ${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-dialyzer-
${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-
- name: Fetch dependencies
run: mix deps.get

View file

@ -51,20 +51,24 @@ jobs:
runs-on: ubuntu-latest
env:
MIX_ENV: dev
OTP_VERSION: "29.0"
ELIXIR_VERSION: "1.20"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: erlef/setup-beam@v1
with:
otp-version: "29.0"
elixir-version: "1.20"
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-dialyzer-${{ hashFiles('mix.lock') }}
_build/dev/*.plt
key: ${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get