Skip to content

Drop redundant compile-time config validator - #149

Merged
tfwright merged 1 commit into
mainfrom
fix/drop-redundant-compile-config-validator
Aug 1, 2026
Merged

Drop redundant compile-time config validator#149
tfwright merged 1 commit into
mainfrom
fix/drop-redundant-compile-config-validator

Conversation

@tfwright

@tfwright tfwright commented Aug 1, 2026

Copy link
Copy Markdown
Owner

What

Removes the application-level validate_compile_time_config!/0 boot check (and its test), and clarifies the config docs.

Why

Global resource config keys are already read through Application.compile_env/2 inside the live_admin/2 router macro, which expands into the host application's router. Elixir therefore raises at the host's boot whenever one of these keys diverges between compile time and runtime — we get the guarantee for free.

The application-level boot check duplicated this, and did so unreliably: it captured compile_env against LiveAdmin's own compilation rather than the host app's, so the values it compared were not the ones actually used. This removes it and leans on Elixir's built-in mismatch detection instead.

Verification

  • mix do compile --warnings-as-errors + test — clean compile, 45 tests, 0 failures
  • mix format clean

🤖 Generated with Claude Code

Global resource config keys are already read through
Application.compile_env/2 inside the live_admin/2 router macro,
which expands into the host application's router. Elixir therefore
raises at the host's boot whenever one of these keys diverges
between compile time and runtime, giving us the guarantee for free.

The application-level boot check duplicated this behavior, and did
so unreliably: it captured compile_env against LiveAdmin's own
compilation rather than the host app's, so the values it compared
were not the ones actually used. Remove it and lean on Elixir's
built-in mismatch detection instead, and clarify the docs to say so.
@tfwright
tfwright merged commit 8cdae91 into main Aug 1, 2026
6 checks passed
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.

1 participant