chore: remove stale dialyzer ignores and fix CI PLT caching
- 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:
parent
14d84bef01
commit
7bf0eecfbe
3 changed files with 15 additions and 24 deletions
|
|
@ -21,10 +21,6 @@
|
||||||
# is called with a tuple that satisfies the runtime contract but violates the opaque type spec
|
# is called with a tuple that satisfies the runtime contract but violates the opaque type spec
|
||||||
{"lib/aprsme_web/gettext.ex", :call_without_opaque},
|
{"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
|
# 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
|
# nil | number() from the call sites in mobile_channel — the clause is defensive dead code
|
||||||
{"lib/aprsme_web/channels/mobile_channel.ex"},
|
{"lib/aprsme_web/channels/mobile_channel.ex"},
|
||||||
|
|
@ -46,16 +42,5 @@
|
||||||
# Mix.Project PLT limitations: Mix.Project.compile_path/0 and
|
# 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
|
# 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.
|
# is treated as having an unmatched return when used for side-effect.
|
||||||
{"lib/mix_unused/analyzer.ex"},
|
{"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"}
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,8 @@ jobs:
|
||||||
container: git.mcintire.me/graham/elixir-base:latest
|
container: git.mcintire.me/graham/elixir-base:latest
|
||||||
env:
|
env:
|
||||||
MIX_ENV: dev
|
MIX_ENV: dev
|
||||||
|
OTP_VERSION: "29.0"
|
||||||
|
ELIXIR_VERSION: "1.20"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git for submodules
|
- name: Configure git for submodules
|
||||||
|
|
@ -85,15 +87,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Restore dependency and build caches
|
- name: Restore PLT cache
|
||||||
uses: https://code.forgejo.org/actions/cache@v4
|
uses: https://code.forgejo.org/actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
deps
|
deps
|
||||||
_build
|
_build/dev/*.plt
|
||||||
key: ${{ runner.os }}-dialyzer-${{ hashFiles('**/mix.lock') }}
|
key: ${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-${{ hashFiles('**/mix.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-dialyzer-
|
${{ runner.os }}-dialyzer-otp${{ env.OTP_VERSION }}-elixir${{ env.ELIXIR_VERSION }}-
|
||||||
|
|
||||||
- name: Fetch dependencies
|
- name: Fetch dependencies
|
||||||
run: mix deps.get
|
run: mix deps.get
|
||||||
|
|
|
||||||
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -51,20 +51,24 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
MIX_ENV: dev
|
MIX_ENV: dev
|
||||||
|
OTP_VERSION: "29.0"
|
||||||
|
ELIXIR_VERSION: "1.20"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: "29.0"
|
otp-version: ${{ env.OTP_VERSION }}
|
||||||
elixir-version: "1.20"
|
elixir-version: ${{ env.ELIXIR_VERSION }}
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
deps
|
deps
|
||||||
_build
|
_build/dev/*.plt
|
||||||
key: ${{ runner.os }}-dialyzer-${{ hashFiles('mix.lock') }}
|
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.hex --force
|
||||||
- run: mix local.rebar --force
|
- run: mix local.rebar --force
|
||||||
- run: mix deps.get
|
- run: mix deps.get
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue