Skip to content

feat: Lua 5.1+ support (1.3.0) + Lua 5.1-5.4 matrix CI#4

Closed
andrewstarks wants to merge 1 commit into
feat/lua51-bitops-shimfrom
feat/lua51-compat-release
Closed

feat: Lua 5.1+ support (1.3.0) + Lua 5.1-5.4 matrix CI#4
andrewstarks wants to merge 1 commit into
feat/lua51-bitops-shimfrom
feat/lua51-compat-release

Conversation

@andrewstarks
Copy link
Copy Markdown
Owner

Stacked on #3 — please merge #3 first. This PR's base is feat/lua51-bitops-shim; GitHub will automatically retarget it to main once #3 lands.

Summary

Completes the compat slice of the Lua 5.1/5.2 compat plan. With the bitops shim already in place from #3, this PR relaxes the rockspec floor, registers the new modules, adds matrix CI, fixes two small test-harness portability issues, and bumps the version to 1.3.0.

  • Rockspec parse_sdp-1.3.0-1.rockspec (renamed from 1.2.1)
    • lua >= 5.1, < 5.6 (was >= 5.3)
    • registers parse_sdp.grammar.bitops / .bitops_53 / .bitops_compat in build.modules
    • no new dependencies on any Lua version
  • Test harness portability:
    • spec/grammar_base_spec.lua:1349(table.unpack or unpack)(media_block) so 5.1 (unpack global) and 5.2+ (table.unpack) both work.
    • spec/cli_spec.lua run() — capture exit codes via a subshell that writes $? to a temp file. The 3-value return from io.popen():close() was added in 5.2; 5.1's close() returns only a status flag, so the test helper has to round-trip the exit code through the filesystem.
  • CI .github/workflows/test.yml:
    • new matrix job runs the full hermetic suite on Lua 5.1 / 5.2 / 5.3 / 5.4 in parallel using leafo/gh-actions-lua@v10
    • existing test (Docker, Lua 5.5) and conformance jobs unchanged — Docker stays the 5.5 reference and runs the AMWA conformance fixtures
  • Docs — CHANGELOG [1.3.0], README tagline Lua 5.1 - 5.5, GUIDE "Supported Lua versions" paragraph, CLAUDE.md updates (Project Purpose, Tech Stack, Lua-version portability rule), PLAN.md compat-slice checkbox flipped.

Test plan

  • Local matrix run: 1208 / 0 failures under hererocks-built Lua 5.1, 5.2, 5.3, 5.4 plus Docker Lua 5.5.
  • Remote CI matrix passes on this PR (will validate leafo/gh-actions-lua is set up correctly).
  • Conformance job on this PR stays green.

After merge, the release slice (tag v1.3.0, publish to LuaRocks) is the only step left — that needs your LuaRocks API token, so I stopped here.

🤖 Generated with Claude Code

Relax rockspec dependency from `lua >= 5.3, < 5.6` to `lua >= 5.1,
< 5.6`. Register the three bitops modules (bitops, bitops_53,
bitops_compat) in build.modules. Bump version to 1.3.0.

Compat fixes for the test harness:
- spec/grammar_base_spec.lua:1349 — (table.unpack or unpack)(...)
  so the call works on 5.1 (which has `unpack` as a global) and
  5.2+ (which has `table.unpack`).
- spec/cli_spec.lua run() — capture exit codes via a subshell that
  emits $? to a temp file. The three-value return from
  io.popen():close() was added in 5.2; on 5.1 the popen close
  returns only a status flag, so reading $? back through the
  filesystem is the portable path.

CI:
- New `matrix` job using leafo/gh-actions-lua@v10 runs the full
  hermetic suite on 5.1 / 5.2 / 5.3 / 5.4 in parallel.
- Existing Docker `test` job (Lua 5.5) and `conformance` job
  remain unchanged.

Docs: CHANGELOG [1.3.0] entry; README tagline → `Lua 5.1 - 5.5`;
GUIDE Installation gains "Supported Lua versions"; CLAUDE.md gets
Project Purpose / Tech Stack / portability-rule updates; PLAN.md
checklist marks the compat slice done.

Local matrix: 1208 / 0 failures under hererocks-built 5.1, 5.2, 5.3,
5.4 plus Docker 5.5.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andrewstarks andrewstarks deleted the branch feat/lua51-bitops-shim May 26, 2026 19:52
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