Skip to content

Release 0.8.0: known-issue fixes, CI on Lua 5.1-5.4 and LuaJIT - #4

Merged
Luca96 merged 6 commits into
masterfrom
fix-known-issues
Nov 20, 2026
Merged

Luca96 merged 6 commits into
masterfrom
fix-known-issues

Conversation

@Luca96

@Luca96 Luca96 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Prepares the first stable LuaRocks release (only scm-1 is published today).

What's in it

  • Fixes from the changelog's Unreleased section (now the 0.8.0 section): group/slide/shift on Lua 5.2+, max/min, cyclic tables, clone sharing, uniform shuffle, table.of, deep-copying init, caller-line argument errors, and more. Plus spec/regression.lua, an internal end-to-end regression script that runs with plain lua (not part of the busted suite).
  • CI (.github/workflows/test.yml): busted on Lua 5.1, 5.2, 5.3, 5.4 and LuaJIT 2.1, the same setup as lua-reg (gh-actions-lua v13, gh-actions-luarocks v6 / LuaRocks 3.13).
  • LuaJIT fix in the test helpers: reordered() (in spec/helpers.lua and spec/regression.lua) presized tables with a constructor of nil fields, which LuaJIT doesn't presize. It now grows the hash part with placeholder keys and removes them afterwards. Library code was unaffected.
  • Release prep:
    • rockspecs/luatable-0.8.0-1.rockspec (tag v0.8.0, lua >= 5.1, refreshed description)
    • scm-1 rockspec: lowercase luatable, lua >= 5.1
    • table.info() reports 0.8.0, with a spec + regression-script check tying it to the release rockspec
    • README: CI badge, supported versions, luarocks install luatable

After merging

  1. git tag v0.8.0 <merge commit> and git push origin v0.8.0
  2. luarocks upload rockspecs/luatable-0.8.0-1.rockspec --api-key=…

Checks

  • CI: all five jobs green.
  • Locally (Lua 5.4): busted 278/278, lua spec/regression.lua 125/125 (exit 0), luarocks lint clean on both rockspecs.

🤖 Generated with Claude Code

Luca96 and others added 6 commits November 14, 2026 17:10
Bump the rockspec to format 3.0 and declare busted as the test runner
and a test-only dependency, so `luarocks test` runs the suite from the
repository root. Also switch the source URL from the dead git:// form
to git+https://.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- deepflat visits hash keys in a fixed order (numbers, strings,
  booleans, tables by content, then other types by identity), so its
  output and deep equal no longer depend on pairs order. Table keys are
  compared lazily, stopping at the first difference.
- Add table.of(...), which always packs its arguments: table.of(t) is
  { t }. table.new and table(t) still wrap a single table in place.
- init deep-copies a table init value into each slot instead of
  sharing one table.
- shuffle uses Fisher-Yates, so every ordering is equally likely.

Each fix comes with spec regression tests and demo checks that fail on
the previous code. examples/demo.lua is a self-checking tour of every
public function. The dot-access issue stays open in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LuaJIT doesn't reserve hash slots for nil fields in a table constructor, so
reordered() never changed the pairs order there. Grow the hash part with
placeholder keys instead and remove them after copying (deleting keys never
shrinks a table), which works on every Lua version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rockspecs/luatable-0.8.0-1.rockspec: tag v0.8.0, lua >= 5.1, refreshed description
- scm-1 rockspec: lowercase package name, lua >= 5.1
- table.info() reports 0.8.0; a spec and a demo check tie it to the release rockspec
- changelog: Unreleased becomes 0.8.0; README: CI badge, supported versions,
  luarocks install line, roadmap updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It is an internal end-to-end regression script, not a user example: move it out
of examples/ (busted only runs *_spec files, so it stays out of the busted suite).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luca96
Luca96 merged commit 3650fcd into master Nov 20, 2026
10 checks passed
@Luca96
Luca96 deleted the fix-known-issues branch November 20, 2026 20:48
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.

1 participant