Title: Supersede the FFI-parenthesisation half of ADR 0003 once pslua ships its Lua parser · Issue #7 · purescript-lua/purescript-lua-package-sets · GitHub
Open Graph Title: Supersede the FFI-parenthesisation half of ADR 0003 once pslua ships its Lua parser · Issue #7 · purescript-lua/purescript-lua-package-sets
X Title: Supersede the FFI-parenthesisation half of ADR 0003 once pslua ships its Lua parser · Issue #7 · purescript-lua/purescript-lua-package-sets
Description: 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...
Open Graph Description: 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 becau...
X Description: 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 ...
Opengraph URL: https://github.com/purescript-lua/purescript-lua-package-sets/issues/7
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Supersede the FFI-parenthesisation half of ADR 0003 once pslua ships its Lua parser","articleBody":"`pslua` [PR #197](https://github.com/purescript-lua/purescript-lua/pull/197) (merged) replaces the lexical foreign-file splitter with a real Lua 5.1 parser. That invalidates half of [ADR 0003](docs/adr/0003-lua-51-target-and-ffi-parens.md): 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.\n\nThe Lua-5.1-target half of ADR 0003 is untouched and stays as-is.\n\n## Why this waits\n\nA 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.\"\n\n## What to do when that bump happens\n\n- 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.\n- Update `CONTRIBUTING.md`'s FFI rule (currently \"Parenthesise every FFI export\").\n- Update the ADR README index entry for 0003 (status/summary).\n- 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.\n\n## Reference\n\n- pslua PR: https://github.com/purescript-lua/purescript-lua/pull/197\n- pslua issue: https://github.com/purescript-lua/purescript-lua/issues/173\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-07-07T13:25:57Z","url":"https://github.com/purescript-lua/purescript-lua-package-sets/issues/7"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ff2d0fd2-f1be-8655-8b02-b18e2fbe95ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D32E:ADA9D:944893:C1F9DD:6B00E004 |
| html-safe-nonce | 93f937b1bde79c830b1e3af4b74da30c6735172db2dae0b852d8f3132c1bbc75 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzJFOkFEQTlEOjk0NDg5MzpDMUY5REQ6NkIwMEUwMDQiLCJ2aXNpdG9yX2lkIjoiNzczMDEwNDU2OTQ1NTIzOTE3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e8e85823fcf838c3a04d62989ed8123577e7b3cf51eb29b5194c1481e095cc52 |
| hovercard-subject-tag | issue:4828949991 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua-package-sets/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a69c741c40f4da82cdd6578b7a4321c64d4034aefe2ad892e55a4ccb1fe5b90/purescript-lua/purescript-lua-package-sets/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a69c741c40f4da82cdd6578b7a4321c64d4034aefe2ad892e55a4ccb1fe5b90/purescript-lua/purescript-lua-package-sets/issues/7 |
| og:image:alt | 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 becau... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Unisay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-lua/purescript-lua-package-sets git https://github.com/purescript-lua/purescript-lua-package-sets.git |
| octolytics-dimension-user_id | 131581790 |
| octolytics-dimension-user_login | purescript-lua |
| octolytics-dimension-repository_id | 620972139 |
| octolytics-dimension-repository_nwo | purescript-lua/purescript-lua-package-sets |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 69126177 |
| octolytics-dimension-repository_parent_nwo | purescript/package-sets |
| octolytics-dimension-repository_network_root_id | 69126177 |
| octolytics-dimension-repository_network_root_nwo | purescript/package-sets |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width