Skip to content

Conversation

@kianmeng
Copy link
Contributor

@kianmeng kianmeng commented Nov 26, 2025

  • bump actions/checkout and actions/cache
  • run linting jobs only on latest Elixir/Erlang matrix
  • support the min/max range of Elixir/Erlang matric
  • remove depreciation warning in preferred cli env

Comment on lines 39 to 43
- elixir: "1.14"
otp: "24"
- elixir: "1.19"
otp: "28"
lint: lint
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it simple, setup-beam will auto expand the version into latest greatest version, and we test the minimal and maximum supported matrix.


- name: Check source code format
run: mix format --check-formatted
if: ${{ matrix.lint }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run this only for latest greatest Elixir/Erlang.

mix.exs Outdated
version: @version,
name: "Joken",
elixir: "~> 1.13",
elixir: "~> 1.14",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tally with the min version in CI matrix.

mix.lock Outdated
"castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"},
"certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"},
"credo": {:hex, :credo, "1.7.7", "771445037228f763f9b2afd612b6aa2fd8e28432a95dbbc60d8e03ce71ba4446", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8bc87496c9aaacdc3f90f01b7b0582467b69b4bd2441fe8aae3109d843cc2f2e"},
"credo": {:hex, :credo, "1.7.13", "126a0697df6b7b71cd18c81bc92335297839a806b6f62b61d417500d1070ff4e", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "47641e6d2bbff1e241e87695b29f617f1a8f912adea34296fb10ecc3d7e9e84f"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to ensure it compiles on Elixir 1.19.

@victorolinasc
Copy link
Collaborator

This is awesome @kianmeng !

I have updated deps outside this PR (because I wanted to raise the minimum version of Elixir support as well). Could you update accordingly here?

Thanks a lot for your contribution!

- bump actions/checkout and actions/cache
- run linting jobs only on latest Elixir/Erlang matrix
- support the min/max range of Elixir/Erlang matric
- remove depreciation warning in preferred cli env
def cli do
[
preferred_envs: [
coveralls: :test,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: setting :preferred_cli_env in your mix.exs "def project" is deprecated, set it inside "def cli" instead:                         
                                                                     
    def cli do       
      [preferred_envs: [coveralls: :test, "coveralls.github": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html":
 :test]]                                                             
    end

  (mix 1.19.2) lib/mix/cli.ex:187: Mix.CLI.preferred_cli_env/3
  (mix 1.19.2) lib/mix/cli.ex:170: Mix.CLI.maybe_change_env_and_target/2
  (mix 1.19.2) lib/mix/cli.ex:59: Mix.CLI.proceed/2
  /home/ang/.asdf/installs/elixir/1.19.2-otp-28/bin/mix:7: (file)
  (elixir 1.19.2) src/elixir_compiler.erl:81: :elixir_compiler.dispatch/4
  (elixir 1.19.2) src/elixir_compiler.erl:56: :elixir_compiler.compile/4

@kianmeng
Copy link
Contributor Author

kianmeng commented Dec 15, 2025

@victorolinasc If I remember correctly, upgrading jose deps from 1.11.10 to 1.11.12 will cause the following compilation issue. See https://github.com/joken-elixir/joken/actions/runs/20241089366/job/58109138180?pr=441

src/json/jose_json.erl:14:18: type dynamic() undefined
%   14| -callback encode(dynamic()) -> binary().
%     |                  ^

src/json/jose_json_jason.erl:4:2: Warning: behaviour jose_json undefined
%    4| -behaviour(jose_json).
%     |  ^

src/json/jose_json_jiffy.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_jsone.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_jsx.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_ojson.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_otp.erl:30:15: type dynamic() undefined
%   30| -spec encoder(dynamic(), json:encoder()) -> iodata().
%     |               ^

src/json/jose_json_otp.erl:4:2: Warning: behaviour jose_json undefined
%    4| -behaviour(jose_json).
%     |  ^

src/json/jose_json_poison.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_poison_lexical_encoder.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_thoas.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_unsupported.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

src/json/jose_json_poison_compat_encoder.erl:12:2: Warning: behaviour jose_json undefined
%   12| -behaviour(jose_json).
%     |  ^

could not compile dependency :jose, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile jose --force", update it with "mix deps.update jose" or clean it with "mix deps.clean jose"
Error: Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants