Skip to content

Rewrite atom interpolations - non keywords#15531

Open
sabiwara wants to merge 3 commits into
elixir-lang:mainfrom
sabiwara:migrate-atom-interpolation
Open

Rewrite atom interpolations - non keywords#15531
sabiwara wants to merge 3 commits into
elixir-lang:mainfrom
sabiwara:migrate-atom-interpolation

Conversation

@sabiwara

@sabiwara sabiwara commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Since we are soft-deprecating the :"foo#{x}" in favor of String.to_unsafe_atom/1, I figured I'd rewrite these in the codebase already.

I added a new migrate_atom_interpolations formatter option to perform this (first commit).
We don't have to keep it though if we don't want to, I wanted this for myself and figured it might help people address this deprecation more easily (which is the point of --migrate).

If we want to indeed support the option, will add proper tests and support for keywords as well, I wanted to get feedback first.

@josevalim josevalim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. My only concern is that the migrate_atom_interpolation will push everyone to Elixir v1.21 but given migration is opt-in, we are likely fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants