Skip to content

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

Merged
andrewstarks merged 1 commit into
mainfrom
feat/lua51-compat-release
May 26, 2026
Merged

feat: Lua 5.1+ support (1.3.0) + Lua 5.1-5.4 matrix CI#5
andrewstarks merged 1 commit into
mainfrom
feat/lua51-compat-release

Conversation

@andrewstarks
Copy link
Copy Markdown
Owner

Replaces #4 (closed when its base branch feat/lua51-bitops-shim was deleted on merge of #3 — stacked-PR mechanics: deleting the base ref closes the dependent PR irreversibly). Now rebased onto current main.

Completes the compat slice of the Lua 5.1/5.2 compat plan. The bitops shim from #3 is already on main; 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.

Summary

  • 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
  • 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 (validates leafo/gh-actions-lua setup on GH runner).
  • Conformance job stays green.

After merge, the release slice (tag v1.3.0, publish to LuaRocks) is the only step left.

🤖 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 merged commit c37e691 into main May 26, 2026
6 checks passed
@andrewstarks andrewstarks deleted the feat/lua51-compat-release branch May 26, 2026 19:53
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