From cfd77b2c7cda142ff7c4c6d08cbb5388f7e5e624 Mon Sep 17 00:00:00 2001 From: Joseph Koski Date: Fri, 6 Feb 2026 14:34:01 -0800 Subject: [PATCH] Update --- lib/eq/dsl/parser.ex | 3 +++ lib/ord/dsl/parser.ex | 1 + lib/predicate/dsl/parser.ex | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/eq/dsl/parser.ex b/lib/eq/dsl/parser.ex index 85fcc152..1596365a 100644 --- a/lib/eq/dsl/parser.ex +++ b/lib/eq/dsl/parser.ex @@ -95,6 +95,7 @@ defmodule Funx.Eq.Dsl.Parser do {:__aliases__, meta, _} = module_alias -> # Try to parse as behaviour module expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) if function_exported?(expanded_module, :eq, 1) do parse_bare_behaviour_module(module_alias, [], meta, caller_env) @@ -114,6 +115,7 @@ defmodule Funx.Eq.Dsl.Parser do # Parses a bare behaviour module reference into a Step node. defp parse_bare_behaviour_module(module_alias, opts, meta, caller_env) do expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) unless function_exported?(expanded_module, :eq, 1) do raise CompileError, @@ -366,6 +368,7 @@ defmodule Funx.Eq.Dsl.Parser do end expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) cond do function_exported?(expanded_module, :eq?, 2) -> diff --git a/lib/ord/dsl/parser.ex b/lib/ord/dsl/parser.ex index b78eca0c..606c4915 100644 --- a/lib/ord/dsl/parser.ex +++ b/lib/ord/dsl/parser.ex @@ -293,6 +293,7 @@ defmodule Funx.Ord.Dsl.Parser do end expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) cond do function_exported?(expanded_module, :lt?, 2) -> diff --git a/lib/predicate/dsl/parser.ex b/lib/predicate/dsl/parser.ex index 8e6dd25b..ff0e55ae 100644 --- a/lib/predicate/dsl/parser.ex +++ b/lib/predicate/dsl/parser.ex @@ -145,6 +145,7 @@ defmodule Funx.Predicate.Dsl.Parser do {:__aliases__, meta, _} = module_alias -> # Try to parse as behaviour module expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) if function_exported?(expanded_module, :pred, 1) do parse_behaviour_module(module_alias, [], meta, caller_env) @@ -163,6 +164,7 @@ defmodule Funx.Predicate.Dsl.Parser do defp parse_behaviour_module(module_alias, opts, meta, caller_env) do expanded_module = Macro.expand(module_alias, caller_env) + Code.ensure_compiled(expanded_module) unless function_exported?(expanded_module, :pred, 1) do raise CompileError,