build: vendor metalua and stringutils as tracked files - #49
Open
dsent wants to merge 1 commit into
Open
Conversation
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.
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.
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:
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.