Skip to content

Fix missing :p256dh atom#2

Closed
speeddragon wants to merge 2 commits into
kenichi:mainfrom
speeddragon:main
Closed

Fix missing :p256dh atom#2
speeddragon wants to merge 2 commits into
kenichi:mainfrom
speeddragon:main

Conversation

@speeddragon

@speeddragon speeddragon commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

String.to_existing_atom(key) will give an error because :p256dh atom doesn't exist. I think in your application, you have this atom, so it works when you use this dependency.

I believe that :auth is common, but to not depend on other dependencies, I've added it as well.

Feel free to modify to improve this version, not sure which alternative we can have to have an atom here that is useful for this to use and to_existing_atom to not give an error.

@kenichi

kenichi commented Jul 8, 2025

Copy link
Copy Markdown
Owner

Oh my, this exhibits some interesting behavior. Since the atom does occur in a type spec, if the compiler is invoked, then the atom exists in the VM. I think it will be best to avoid usage of String.to_existing_atom/1 altogether. And you were correct, my app does have the atom in the ecto schema that persists subscriptions. Let me try some things...

@kenichi kenichi mentioned this pull request Jul 8, 2025
@kenichi

kenichi commented Jul 8, 2025

Copy link
Copy Markdown
Owner

closing in favor of #3

@kenichi kenichi closed this Jul 8, 2025
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.

2 participants