pslua PR #197 (merged) replaces the lexical foreign-file splitter with a real Lua 5.1 parser. That invalidates half of ADR 0003: the "every FFI export must be parenthesised" rule existed only because the old reader found a value's end by counting balanced parens. ADR 0003's own Consequences section anticipated this: "Relaxing the parenthesis requirement would mean teaching pslua to find a value's end without the parentheses, which needs real Lua parsing. That is a compiler decision, recorded in the pslua repository, not here." That decision has now been made.
The Lua-5.1-target half of ADR 0003 is untouched and stays as-is.
Why this waits
A released pslua still reads only the parenthesised form until the parser ships in a version this set's forks target. Dropping the parenthesisation requirement from the docs before then would describe a contract the floor version can't actually read. This should land together with whatever package-set bump first requires a pslua version that includes the parser, so the ADR can name the exact version threshold instead of a vague "eventually."
What to do when that bump happens
- Add a new ADR (0010) superseding the relevant part of 0003: parentheses become optional (the parser drops grouping parens; existing parenthesised FFI stays valid), gated on the
pslua version threshold.
- Update
CONTRIBUTING.md's FFI rule (currently "Parenthesise every FFI export").
- Update the ADR README index entry for 0003 (status/summary).
- Re-check ADR 0007's rationale for lua-format over StyLua: one of its supporting arguments (StyLua strips parens the old reader needed) gets weaker, though lua-format may still be preferred for other reasons.
Reference
psluaPR #197 (merged) replaces the lexical foreign-file splitter with a real Lua 5.1 parser. That invalidates half of ADR 0003: the "every FFI export must be parenthesised" rule existed only because the old reader found a value's end by counting balanced parens. ADR 0003's own Consequences section anticipated this: "Relaxing the parenthesis requirement would mean teaching pslua to find a value's end without the parentheses, which needs real Lua parsing. That is a compiler decision, recorded in the pslua repository, not here." That decision has now been made.The Lua-5.1-target half of ADR 0003 is untouched and stays as-is.
Why this waits
A released
psluastill reads only the parenthesised form until the parser ships in a version this set's forks target. Dropping the parenthesisation requirement from the docs before then would describe a contract the floor version can't actually read. This should land together with whatever package-set bump first requires apsluaversion that includes the parser, so the ADR can name the exact version threshold instead of a vague "eventually."What to do when that bump happens
psluaversion threshold.CONTRIBUTING.md's FFI rule (currently "Parenthesise every FFI export").Reference