Skip to content

build: vendor metalua and stringutils as tracked files - #49

Open
dsent wants to merge 1 commit into
aldum:devfrom
dsent:dsent/vendor-metalua-stringutils
Open

build: vendor metalua and stringutils as tracked files#49
dsent wants to merge 1 commit into
aldum:devfrom
dsent:dsent/vendor-metalua-stringutils

Conversation

@dsent

@dsent dsent commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Rationale

Metalua's last commit from its author is from June 2014. The compy-toys fork is where all movement since has happened, and its only forks belong to contributors here. compy-toys/stringutils has no fork and no consumer but this repository.

The current arrangement means:

  • three rounds for a one-line change to stringutils: open a PR against stringutils, wait for the merge, bump the pin in metalua and open a PR there, wait for that merge, then bump the pin here. Skipping steps is the natural response, and the visible result is that src/lib/metalua is pinned at a pull-request or a separate fork or whatever.

The other cost is drift against itself. stringutils is carried twice at two different commits — src/util/string at ff9be4b9 and src/lib/metalua/stringutils at 3662789, three commits behind it — so one checkout holds two versions of the same library.

What's here

src/lib/metalua now holds metalua-parser, plus compiler/ast_to_src.lua, the only piece of metalua-compiler that model/lang/lua/parser.lua reaches.

Dropped: the bytecode compiler, metalua/loader.lua, compiler/globals.lua, the metalua.lua CLI, and every .mlua source. Nothing loads the metalua loader at runtime, so no .mlua file was reachable. compiler/parser/common.lua returns an empty table for an upstream parser.init() this fork doesn't have, and nothing requires it.

For review: across those sixteen files, the only change that isn't a license header is one line — ast_to_src.lua requires util.string.string instead of stringutils.string, so the one surviving stringutils serves both. Everything else is byte-identical to the pinned submodule content.

Licensing

metalua is dual-licensed MIT and EPL-1.0. This copy is carried under MIT alone: the EPL paragraphs are dropped from each of the sixteen headers, the authors' copyright and contributor lines stay, and LICENSE carries the MIT text. src/lib/metalua/README.md records the origin commit and what was left behind.

Tests

The AST corpus moved from the submodule's spec/ to tests/interpreter/ast_inputs.lua, beside the suite's other inputs, so ast_spec no longer degrades to zero cases when submodules are missing.

693 successes / 0 failures, identical to dev before the change; --tags ast is 148 on both sides. A fresh --no-recurse-submodules clone has no .gitmodules and passes 693/0.

A submodule buys isolation from an upstream that moves on its own.
Neither of these has one. Metalua's last commit from its author is
from June 2014; the compy-toys fork is where all movement since then
has happened, and its only forks are personal ones belonging to
contributors here. compy-toys/stringutils has no fork and no consumer
but this repository. So the isolation is bought against nothing,
while the ceremony is paid in full.

That ceremony is three rounds for a one-line change to stringutils:
open a PR against stringutils, wait for the merge, bump the pin in
metalua and open a PR there, wait for that merge, then bump the pin
here. Skipping steps is the natural response, and the visible result
is that src/lib/metalua is pinned at d0dbd0d9 — a pull-request head
rather than a commit on a branch.

The other cost is drift against itself. stringutils is carried twice
at two different commits — src/util/string at ff9be4b9 and
src/lib/metalua/stringutils at 3662789, three commits behind it — so
one checkout holds two versions of the same library, and which one a
module gets depends on the path it requires.

src/lib/metalua now holds the part this project loads: the fifteen
modules metalua packages as metalua-parser, plus
compiler/ast_to_src.lua, the only piece of metalua-compiler that
model/lang/lua/parser.lua reaches. Dropped: the bytecode compiler,
metalua/loader.lua, compiler/globals.lua, the metalua.lua CLI and
every .mlua source. Nothing loads the metalua loader at runtime, so
no .mlua file was reachable. compiler/parser/common.lua returns an
empty table for an upstream parser.init() this fork does not have and
nothing requires it.

Across those sixteen files the only change that is not a license
header is one line: ast_to_src.lua now requires util.string.string
instead of stringutils.string, so the surviving stringutils serves
both.

metalua is dual-licensed MIT and EPL-1.0. This copy is carried under
MIT alone: the EPL paragraphs are dropped from each header, the
authors' copyright and contributor lines stay, and LICENSE carries
the MIT text. src/lib/metalua/README.md records the origin commit and
what was left behind.

The AST corpus moved from the submodule's spec/ to
tests/interpreter/ast_inputs.lua, beside the suite's other inputs, so
ast_spec no longer degrades to zero cases when submodules are
missing.

Tests: 693 successes / 0 failures, matching this branch's point
before the change, with the ast tag at 148 both sides.
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