Skip to content

Rename record type to cache_record type to fix compilation on Erlang 29.0#433

Open
TBK145 wants to merge 1 commit intowhitfin:mainfrom
TBK145:patch-1
Open

Rename record type to cache_record type to fix compilation on Erlang 29.0#433
TBK145 wants to merge 1 commit intowhitfin:mainfrom
TBK145:patch-1

Conversation

@TBK145
Copy link

@TBK145 TBK145 commented Feb 12, 2026

Erlang 29 (release candidate 1) doesn't allow built-in types (like record) to be redefined.
This leads to the following compilation error:

==> cachex
Compiling 56 files (.ex)

== Compilation error in file lib/cachex/spec/validator.ex ==
** (Kernel.TypespecError) lib/cachex/spec/validator.ex:14: type record/0 is a built-in type and it cannot be redefined
    (elixir 1.19.5) lib/kernel/typespec.ex:992: Kernel.Typespec.compile_error/2
    (stdlib 8.0) lists.erl:2465: :lists.foldl/3
    (elixir 1.19.5) lib/kernel/typespec.ex:230: Kernel.Typespec.translate_typespecs_for_module/2

I renamed the type record to cache_record to fix this.

…29.0

Erlang 29 (release candidate 1) doesn't allow built-in types (like record) to be redefined.
@TBK145
Copy link
Author

TBK145 commented Feb 12, 2026

I'm thinking now that I misinterpreted the issue, and it was already not allowed to redefine built-in types, but Erlang 29 ships with record as a new type.

@whitfin whitfin self-assigned this Feb 12, 2026
@whitfin whitfin self-requested a review February 12, 2026 19:03
@whitfin whitfin added this to the v5.0.0 milestone Feb 12, 2026
@whitfin
Copy link
Owner

whitfin commented Feb 12, 2026

Hi @TBK145, thanks for reporting!

I don't have spare time right now, but I can definitely look into this and make sure we fully understand what changed. Fortunately I'm planning a major version anyway, so the breaking change here won't matter as much.

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