Skip to content

Comments

Move regexes out of module attributes for OTP 28 compatibility#453

Merged
PragTob merged 1 commit intobencheeorg:mainfrom
TBK145:main
Apr 10, 2025
Merged

Move regexes out of module attributes for OTP 28 compatibility#453
PragTob merged 1 commit intobencheeorg:mainfrom
TBK145:main

Conversation

@TBK145
Copy link
Contributor

@TBK145 TBK145 commented Apr 4, 2025

No description provided.

@PragTob
Copy link
Member

PragTob commented Apr 6, 2025

👋

Hey, thank you very much for the PR! Could you provide some more background on the need for the change please? Skimming the OTP 28.0-rc2 release notes nothing seemed to jump out: https://erlang.org/download/otp_src_28.0-rc2.readme

I tried to run with OTP 28 locally, but I don't have an elixir version compiled with OTP 28 readily available in asdf right now and too little time to see to compile it myself right now, although I think I could/should just build elixir locally

@TBK145
Copy link
Contributor Author

TBK145 commented Apr 7, 2025

Hi! I can't find any documentation that actually says regexes in module attributes are not allowed/working anymore on OTP 28, but when trying to compile it errors like this:

** (ArgumentError) cannot inject attribute @[...] into function/macro because cannot escape #Reference<0.3593705596.978190344.144327>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity

I did find this:
https://www.erlang.org/docs/28/upcoming_incompatibilities.html#otp-28
RobertDober/earmark_parser#162

Edit: And this one in Elixir stating that in the future Elixir 1.18 and 1.19 will warn when doing this: https://github.com/elixir-lang/elixir/pull/14381?ref=geekmonkey.org

@PragTob
Copy link
Member

PragTob commented Apr 10, 2025

@TBK145 ay, marvelous - thank you very much! 💚

Copy link
Member

@PragTob PragTob left a comment

Choose a reason for hiding this comment

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

IMG20230429163945

@PragTob PragTob merged commit c268c45 into bencheeorg:main Apr 10, 2025
15 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.

2 participants