Skip to content

fix: move regexes out of module attributes to fix compatibility with OTP 28 #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

TBK145
Copy link
Contributor

@TBK145 TBK145 commented Apr 7, 2025

No description provided.

@yordis yordis changed the title Move regexes out of module attributes to fix compatibility with OTP 28 fix: move regexes out of module attributes to fix compatibility with OTP 28 Apr 7, 2025
@yordis
Copy link
Member

yordis commented Apr 7, 2025

Hey there, thank you so much for the help. Do you mind sharing more details about the OTP 28 changes and Elixir support for it?

@TBK145
Copy link
Contributor Author

TBK145 commented Apr 8, 2025

Hi, OTP 28 changes the regex implementation from PCRE2 to RE2. As far as I can tell, most things stay the same, but compilation of a regex now returns a reference, which cannot be escaped and therefore not used as a module attribute.
Newer versions of Elixir will have a workaround to still make it compile, but also start emitting deprecation warnings for this: elixir-lang/elixir#14381

@yordis yordis merged commit 1196bc6 into elixir-tesla:master Apr 8, 2025
5 of 7 checks passed
@yordis
Copy link
Member

yordis commented Apr 8, 2025

Thank you for the explanation and reference 💜 🚀

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