Plan: Lua 5.1/5.2 compatibility + adopt PR workflow#1
Merged
Conversation
Lightweight solo process: branch with an intent-shaped name, open a PR, merge when CI is green. Trivial typo / whitespace fixes can still go directly to main. Adds a "Branching & Pull Requests" section to CLAUDE.md and the corresponding step + checklist entry to Development Workflow / Commit Gates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Today the floor is Lua 5.3 because addresses.lua uses native `&` / `>>` / `<<` in int_to_ipv4 and ipv6_add (lines 124-198). Everything else in the library is portable. Plan: isolate the bitwise code behind a three-file shim (bitops.lua dispatcher + bitops_53.lua native backend + bitops_compat.lua wrapping bit32), so 5.3+ keeps native operators and 5.1/5.2 never parses the native-syntax file. Rockspec pulls in the bit32 rock only when _VERSION == "Lua 5.1" (5.2 has it in stdlib). CI grows a leafo/gh-actions-lua matrix across 5.1-5.5. Sliced into four ordered PRs: verification, shim refactor (still 5.3+ floor), compat slice (relax to 5.1, matrix CI, 1.3.0 release docs), then publish. Risks and verify-before-commit steps called out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lua >= 5.3floor isparse_sdp/grammar/addresses.lua:124-198(&/>>/<<inint_to_ipv4andipv6_add). Plan isolates the bitwise code behind a three-file shim (bitops.luadispatcher →bitops_53.luanative /bitops_compat.luawrappingbit32), so 5.3+ keeps native operators and 5.1/5.2 never parses the native-syntax file. Rockspec pullsbit32in only when_VERSION == "Lua 5.1"(5.2 has it in stdlib). Sliced into four ordered PRs (verification, shim refactor, compat slice with matrix CI + 1.3.0 release docs, publish).main.This PR is itself the first application of the new workflow.
Test plan
Docs-only PR. Verification of plan claims happens in the verification-slice PR per PLAN.md's task checklist:
_VERSION-conditional dependency eval works underluarocks-5.1andluarocks-5.5(bit32shows up in the 5.1 install set, not in the 5.5 install set)bit32rock is currently installable on Lua 5.1 (and on LuaJIT 5.1 if we care)🤖 Generated with Claude Code