From 0f44fe06c4c3a0e7569197aaa76037f65896f2d2 Mon Sep 17 00:00:00 2001 From: David Bernheisel Date: Tue, 21 Jul 2026 15:07:44 -0400 Subject: [PATCH 1/2] Only add seo_jsonld to compilers for self in test --- mix.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index eb77a15..2ea2728 100644 --- a/mix.exs +++ b/mix.exs @@ -14,7 +14,7 @@ defmodule SEO.MixProject do elixir: ">= 1.17.0", start_permanent: Mix.env() == :prod, elixirc_paths: elixirc_paths(Mix.env()), - compilers: Mix.compilers() ++ [:seo_jsonld], + compilers: compilers(Mix.env()), aliases: aliases(), deps: deps(), docs: docs(), @@ -31,6 +31,9 @@ defmodule SEO.MixProject do [preferred_envs: [tests: :test]] end + defp compilers(:test), do: Mix.compilers() ++ [:seo_jsonld] + defp compilers(_), do: Mix.compilers() + # Run "mix help compile.app" to learn about applications. def application do [ From 14bc5613c131083a01998ae4367c08b83622665b Mon Sep 17 00:00:00 2001 From: David Bernheisel Date: Tue, 21 Jul 2026 15:23:25 -0400 Subject: [PATCH 2/2] Only unset in prod --- mix.exs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index 2ea2728..981fdb3 100644 --- a/mix.exs +++ b/mix.exs @@ -31,8 +31,13 @@ defmodule SEO.MixProject do [preferred_envs: [tests: :test]] end - defp compilers(:test), do: Mix.compilers() ++ [:seo_jsonld] - defp compilers(_), do: Mix.compilers() + # `:seo_jsonld` materializes the SEO.JSONLD.* modules for THIS library's own + # ExDoc site (:dev) and tests (:test). Dependencies always compile in :prod, + # so gating it out of :prod is what keeps those generated modules from landing + # in consumers' builds — where they'd clash with a consumer that also runs the + # compiler. See config/config.exs for the `:all` vocabulary used here. + defp compilers(:prod), do: Mix.compilers() + defp compilers(_), do: Mix.compilers() ++ [:seo_jsonld] # Run "mix help compile.app" to learn about applications. def application do