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 into
whitfin: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 into
whitfin:mainfrom
TBK145:patch-1

Conversation

@TBK145

@TBK145 TBK145 commented Feb 12, 2026

Copy link
Copy Markdown

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

TBK145 commented Feb 12, 2026

Copy link
Copy Markdown
Author

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

whitfin commented Feb 12, 2026

Copy link
Copy Markdown
Owner

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.

@Cikey

Cikey commented May 21, 2026

Copy link
Copy Markdown

Hey, erlang/OTP 29 is now available, so it would be great to get this merged when you have time.

fortmarek added a commit to tuist/tuist that referenced this pull request Jun 2, 2026
… fix)

Elixir 1.19 promoted `record/0` to a built-in type; cachex 4.0.4 + 4.1.1
both still ship their own `@type record :: ...`, which now fails the
typespec compile pass and breaks every fresh `_build`. Pinning to
TBK145/cachex@patch-1 (the open upstream PR #433) renames the internal
type to `cache_record` and unblocks compilation today; revert to a hex
release once the PR lands.

Necessary follow-on bumps: `cachex 4.0.4 → 4.1.1`, `sleeplocks 1.1.3 →
1.1.4` (transitive). `override: true` because `posthog ~> 1.0` still
pins the old cachex.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fortmarek added a commit to tuist/tuist that referenced this pull request Jun 2, 2026
fortmarek added a commit to tuist/tuist that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants