patch

47f23e8 · gmorell · 2026-05-22 04:18

1 files +10 -1

Files changed

modified config/runtime.exs
+10 −1
@@ -208,9 +208,18 @@ if config_env() == :prod do
208 208 # rendered email at :info — but it gets us off Swoosh.Adapters.Local
209 209 # (which is what the dev mailbox uses), so the magic-link flow at
210 210 # least leaves a trail in the pod log.
211 + # Literal branches (not `String.to_existing_atom/1`) so the atom
212 + # table is populated by the compiler. `bin/git_gud eval` evaluates
213 + # runtime.exs *before* applications are loaded — at that point the
214 + # atom table only contains atoms baked into the release, so any
215 + # dynamic-to-atom conversion of a not-yet-seen value blows up at
216 + # boot. `start` worked because Swoosh.Adapters.SMTP gets loaded
217 + # earlier in that codepath, priming the atoms incidentally.
211 218 smtp_tri = fn var, default ->
212 219 case System.get_env(var, default) do
213 v when v in ~w(always if_available never) -> String.to_existing_atom(v)
220 + "always" -> :always
221 + "if_available" -> :if_available
222 + "never" -> :never
214 223 other -> raise "#{var} must be one of always|if_available|never, got: #{inspect(other)}"
215 224 end
216 225 end

Parents: 0b7ab92