Skip to content

Fix Lua table -> Elixir list mapping - #21

Merged
tom-ehh merged 1 commit into
mainfrom
hotfix/lua-table-bridge
Aug 12, 2026
Merged

Fix Lua table -> Elixir list mapping#21
tom-ehh merged 1 commit into
mainfrom
hotfix/lua-table-bridge

Conversation

@tom-ehh

@tom-ehh tom-ehh commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Patches decode inconsistency in Lua library.

The decode path for lua tables in the library is:

Lua Table -> Elixir Map -> Elixir Keyword List

The issue was that for maps which have >32 key-value pairs are unordered in BEAM, so the heuristic that when keys in the keyword list are sorted natural numbers couldn't hold. This hotfix sorts the keys before running the same approach.

@tom-ehh
tom-ehh requested review from dimamik and a lite review from Copilot and removed request for Copilot August 12, 2026 09:42

@dimamik dimamik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for catching this!
I'm aware that this is not an ideal way of handling this, but it should be relatively fine for now!

@tom-ehh
tom-ehh merged commit 1ffbfdc into main Aug 12, 2026
1 check passed
@tom-ehh
tom-ehh deleted the hotfix/lua-table-bridge branch August 12, 2026 10:16
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