Skip to content

Run 21 executing tests on Lua too, backlog the Lua-only findings - #1501

Merged
Frotty merged 1 commit into
masterfrom
lua-survey-optins
Oct 20, 2026
Merged

Frotty merged 1 commit into
masterfrom
lua-survey-optins

Conversation

@Frotty

@Frotty Frotty commented Oct 20, 2026

Copy link
Copy Markdown
Member

Tests that execute a program run on the interpreter, Jass and pjass, but on Lua only when they opt in with testLua(true). To see what that hides, every executing test that does not opt in was forced through translateAndTestLua after its Jass runs, once with its own flags and once with -inline -localOptimizations (a local harness change, not part of this PR).

Survey numbers

Measured on f0149618c (master with #1498), Windows, bundled Lua 5.3. The same 42 failures appeared on 55b3714f2 before #1498.

tests
executing tests already on Lua (testLua(true)) 457
executing tests forced onto Lua 686
pass on plain Lua 645
pass with -inline -localOptimizations 644
fail on both 41
fail only inlined 1 (GenericsTests.implicitConversions2)

Of the 42 failures:

cause tests
native missing from the Lua test runtime (CreateUnit 13, GetRandomInt 3, SetPlayerState 2, BlzBitOr, SquareRoot, GetHandleId, CreateDestructable, SetPlayerTechMaxAllowed, R2SW) 24
documented Jass/Lua difference (real == tolerance; class plus method type parameters, AGENTS.md §9) 4
test runtime (the test Lua computes in double; the shim's S2I) 2
type-id natives answering defaults on Lua 5
Lua-only defects 7

The defects: compile-time objects get new ids on Lua (CompiletimeTests.testCompiletimeObjectIdMigration*) and an old-generic tuple passed straight back skips its toIndex (GenericsTests.implicitConversions2), both fixed in their own PRs; a generic static dropped when only a static inner class reads it (GenericsWithTypeclassesTests.genericClassWithStaticInnerClass, genericModuleThistypeSmall) and a direct wurstKeyOf call answering 0 (KeyedTableTests.intKeyIsIdentity, classInstanceKeyIsStable), which stay open here. 48 tests said testLua(false); 27 of them fail on Lua, 21 pass.

The two Lua variants cost about 300 s of test time each over the whole suite.

Changes

  • The 21 tests whose testLua(false) was stale now run Lua after their Jass runs (testLua(true).luaOnly(false)): ClassesTests.recyling, recyling2, recyling_random, thisHandling; ClosureTests.testDispatch; GenericsTests.genericForIn, genericForFrom, implicitConversions, implicitConversions3, implicitConversions5, normalFoldlInfer; eight InterpreterTests; SimpleStatementTests.testForIn, testForFrom.
  • BACKLOG.md: the open findings with their evidence (the generic static, wurstKeyOf, the type-id natives) and a proposal to run every executing test on Lua on master CI (-PallBackends), with exemptions that name a documented reason and fail when they go stale.

Testing

ClassesTests, ClosureTests, GenericsTests, InterpreterTests, SimpleStatementTests: 351 tests, all passing, none skipped, on Windows with the bundled Lua 5.3. Linux CI uses lua5.3; macOS (brew lua, version unchecked) is unverified.

Every executing test was forced onto Lua once: these 21 said testLua(false)
but pass there on both plain and inlined Lua, so they now run Lua after their
Jass runs. The failures that remain open (a generic static dropped when only
an inner class reads it, a direct wurstKeyOf call, the type-id natives) and
the proposal to run every executing test on Lua on master CI go to BACKLOG.md.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T14:19:04.395641Z 1e98898 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit d8948c6 into master Oct 20, 2026
2 checks passed
@Frotty
Frotty deleted the lua-survey-optins branch November 25, 2026 08:54
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