Skip to content

🐛 Properly treat keys as atom - #23

Merged
alexdesousa merged 4 commits into
masterfrom
bug/properly-treat-keys-as-atom
Feb 24, 2026
Merged

alexdesousa merged 4 commits into
masterfrom
bug/properly-treat-keys-as-atom

Conversation

@alexdesousa

Copy link
Copy Markdown
Member

This PR fixes a bug where app_env/3,4 keys where not casted to atom() when they where in a list.
This prevented optimizations to the code where instead of using MyAppWeb.Endpoint as a key, we could use "Elixir.MyAppWeb.Endpoint" instead and avoid circular dependencies between Skogsra config and other modules (in the example MyAppWeb.Endpoint) e.g.

# Might create circular dependencies between this module and `MyAppWeb.Endpoint`.
app_env :secret_key_base, :my_app, [MyAppWeb.Endpoint, :secret_key_base],
  type: :binary,
  os_env: "SECRET_KEY_BASE"

# Avoids circular dependencies
app_env :secret_key_base, :my_app, ["Elixir.MyAppWeb.Endpoint", :secret_key_base],
  type: :binary,
  os_env: "SECRET_KEY_BASE"

@alexdesousa alexdesousa self-assigned this Feb 24, 2026
@alexdesousa
alexdesousa force-pushed the bug/properly-treat-keys-as-atom branch from 40baafe to fb19e71 Compare February 24, 2026 20:28
@alexdesousa
alexdesousa merged commit 87a862a into master Feb 24, 2026
3 checks passed
@alexdesousa
alexdesousa deleted the bug/properly-treat-keys-as-atom branch February 24, 2026 20:33
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