From de0e5d70b0ece89bf3cd69b23bae321ee33d28d2 Mon Sep 17 00:00:00 2001 From: Gilbert Date: Tue, 30 Jun 2026 15:45:46 +0800 Subject: [PATCH 1/3] Fix several compilation warnings - Move :preferred_cli_env out of def project into a new def cli to match the new Mix.Project layout. - Rename @type record to spec_record in Cachex.Spec.Validator to avoid shadowing the built-in record type. - Drop unused require Overseer in Cachex; the alias already exposes the module's functions. --- lib/cachex.ex | 1 - lib/cachex/spec/validator.ex | 4 ++-- mix.exs | 15 ++++++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/cachex.ex b/lib/cachex.ex index 60b6e9a9..32e18ef2 100644 --- a/lib/cachex.ex +++ b/lib/cachex.ex @@ -49,7 +49,6 @@ defmodule Cachex do # import util macros require Router - require Overseer # avoid inspect clashes import Kernel, except: [inspect: 2] diff --git a/lib/cachex/spec/validator.ex b/lib/cachex/spec/validator.ex index da76368a..08f82b03 100644 --- a/lib/cachex/spec/validator.ex +++ b/lib/cachex/spec/validator.ex @@ -10,7 +10,7 @@ defmodule Cachex.Spec.Validator do import Cachex.Spec # internal spec to refer to each record type - @type record :: + @type spec_record :: Cachex.Spec.command() | Cachex.Spec.entry() | Cachex.Spec.expiration() @@ -31,7 +31,7 @@ defmodule Cachex.Spec.Validator do This will delegate each record type to a customized validation function. """ - @spec valid?(atom, record) :: boolean + @spec valid?(atom, spec_record) :: boolean # Validates a command specification record. # diff --git a/mix.exs b/mix.exs index 92a128df..0a8a9a70 100644 --- a/mix.exs +++ b/mix.exs @@ -61,7 +61,16 @@ defmodule Cachex.Mixfile do test_coverage: [ tool: ExCoveralls ], - preferred_cli_env: [ + aliases: [ + bench: "run benchmarks/main.exs", + test: [&start_epmd/1, "test"] + ] + ] + end + + def cli do + [ + preferred_envs: [ docs: :docs, bench: :bench, credo: :lint, @@ -69,10 +78,6 @@ defmodule Cachex.Mixfile do coveralls: :cover, "coveralls.html": :cover, "coveralls.travis": :cover - ], - aliases: [ - bench: "run benchmarks/main.exs", - test: [&start_epmd/1, "test"] ] ] end From 7d2f4a1abe30dd63125ef47c50ad639c5e302e21 Mon Sep 17 00:00:00 2001 From: Gilbert Date: Tue, 30 Jun 2026 16:01:17 +0800 Subject: [PATCH 2/3] Tighten CI matrix to maintained Elixir versions Limit the test matrix to Elixir 1.16-1.20, which are the branches currently receiving security patches (or, in the case of 1.20, active bug fixes) per the upstream support policy. --- .github/workflows/ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd07065a..7f195335 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,19 +16,11 @@ jobs: fail-fast: false matrix: elixir: + - '1.20' - '1.19' - '1.18' - '1.17' - '1.16' - - '1.15' - - '1.14' - - '1.13' - - '1.12' - - '1.11' - - '1.10' - - '1.9' - - '1.8' - - '1.7' steps: - uses: actions/checkout@v4 From b2542b7937a2fd5ffe0082ea9b4448e2a546f5ec Mon Sep 17 00:00:00 2001 From: Gilbert Date: Wed, 1 Jul 2026 12:59:36 +0800 Subject: [PATCH 3/3] Bump minimum Elixir to 1.16 and pin CI jobs to 1.20 Raise the declared minimum Elixir version in mix.exs to match the CI matrix floor, and bump the bench/coverage/docs/lint images from 1.19 to 1.20 to track the latest maintained release. --- .github/workflows/ci.yml | 8 ++++---- mix.exs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f195335..e8d5e494 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: name: Benchmark runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 steps: - uses: actions/checkout@v4 @@ -58,7 +58,7 @@ jobs: name: Coverage runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 env: MIX_ENV: cover steps: @@ -80,7 +80,7 @@ jobs: name: Documentation runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 steps: - uses: actions/checkout@v4 @@ -104,7 +104,7 @@ jobs: name: Linting runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 steps: - uses: actions/checkout@v4 diff --git a/mix.exs b/mix.exs index 0a8a9a70..0ffda9a4 100644 --- a/mix.exs +++ b/mix.exs @@ -24,7 +24,7 @@ defmodule Cachex.Mixfile do maintainers: ["Isaac Whitfield"] }, version: @version, - elixir: "~> 1.7", + elixir: "~> 1.16", deps: deps(), docs: [ main: "overview",