diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd07065a..e8d5e494 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 @@ -48,7 +40,7 @@ jobs: name: Benchmark runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 steps: - uses: actions/checkout@v4 @@ -66,7 +58,7 @@ jobs: name: Coverage runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 env: MIX_ENV: cover steps: @@ -88,7 +80,7 @@ jobs: name: Documentation runs-on: ubuntu-latest container: - image: elixir:1.19 + image: elixir:1.20 steps: - uses: actions/checkout@v4 @@ -112,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/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..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", @@ -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