From 8ebcbc9df34da756018865a5647c58889afed168 Mon Sep 17 00:00:00 2001 From: James Harton Date: Thu, 11 Jun 2026 15:29:44 +1200 Subject: [PATCH] fix: compile on Elixir 1.20.x when `comeonin` is not present. `comeonin` is an optional dependency of argon2_elixir, however it is directly referenced in the code. To be honest I'm not sure how this ever worked, but maybe because `__using__` is a macro that makes it different? Anyway, the typechecker is now trying to enter `comeonin` and use it for type inference. Closes #71. --- lib/argon2.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/argon2.ex b/lib/argon2.ex index ec42696..3e1d90f 100644 --- a/lib/argon2.ex +++ b/lib/argon2.ex @@ -40,7 +40,9 @@ defmodule Argon2 do to withstand parallel attacks that use GPUs or other dedicated hardware. """ - use Comeonin + if Code.loaded?(Comeonin) do + use Comeonin + end alias Argon2.Base