Repository navigation
Remove dead code, duplicate helpers and orphaned test assets - #1473
Merged
Merged
Conversation
Remove 13 unreferenced classes, about 80 methods without callers (found with errorprone's unused warnings and a reference scan), a commented-out old tuple-selection implementation, the dead Lua tuple-copy helper, a disabled cache-statistics layer, and the always-on ENABLE_SELECTIVE_GET_HANDLE_ID_SHIMMING flag. Drop the asset generator and the listfile resources only it read, which every compiler jar shipped, plus the unused Jackson dependency and the unpinned stdlib download tasks. Keep one copy of helpers that existed several times: the implementation lookup shared by WurstValidator and ImTranslator, isConstructorThisCall, isWriteAccess, the intrinsic name and package lookups (now in IntrinsicDeclarations), handleTypeOf (now in LuaHashtable), nearestScopeName, the parameter-list text, printIndent and the tests' countOccurrences. Replace Utils helpers that duplicated JDK or Guava methods already in use. Delete 122 test scripts no test reads, two dead test classes, ignored debug harnesses and commented-out tests for removed behaviour. Re-enable ExpressionTests.ints3 ($ hex literals) and rename a BugTests test whose name described the bug rather than the fix. Docs: the two Lua defects fixed by #1471 are no longer described as open, the finished JMPQ3 backlog item is gone, the type-class paragraphs of WURST_LANGUAGE.md are back under their heading, and stale claims (wurst_run.args defaults, the JMPQ3 pin, the macOS JDK, the version file, Lua discovery order, the output channel and release command names) match the code. No en or em dashes remain. The -fixInstallation and -copyMap flags stay accepted, since removing them would reject existing wurst_run.args files; their help now says they have no effect.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 17, 2026
Frotty
added a commit
that referenced
this pull request
Oct 17, 2026
…les (#1477) #1473 removed calculateCallRelationsAndUsedVariables and getUsedVariables as dead code while #1472 added a test calling them; together master's tests no longer compile. Nothing in the compiler computes used variables any more, so the test checks the moved statements through the read path the garbage removal uses.
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.
A second cleanup pass after #1466, covering what it did not reach.
Dead code. 13 unreferenced classes and about 80 methods without callers (errorprone's unused warnings plus a reference scan, then the members that became unused in turn). This includes a commented-out old
translateTupleSelection, the Lua tuple-copy helper (tests already assert its output never appears), a disabled cache-statistics layer inGlobalCaches, and the always-onENABLE_SELECTIVE_GET_HANDLE_ID_SHIMMINGflag, whose documentedfalsebehaviour no longer matched the code. The asset generator goes with the three listfile resources only it read (about 900 KB in every compiler jar), as do the unused Jackson dependency and the unpinned stdlib download tasks.Duplicates. One copy each of: the implementation lookup
WurstValidatorandImTranslatorboth carried (they must agree),isConstructorThisCall(three copies),isWriteAccess, the intrinsic name and package lookups (now inIntrinsicDeclarations),handleTypeOf(now inLuaHashtable),nearestScopeName(three copies), the parameter-list text,printIndentand the tests'countOccurrences(five copies). Utils helpers that duplicated JDK or Guava methods already in use are replaced by them.Tests. 122 test scripts no test reads (1.4 MB),
ErrorReportingTest,GenerateBotData, ignored debug harnesses and commented-out tests for removed behaviour.ExpressionTests.ints3($hex literals, which the grammar accepts) is enabled again, and aBugTeststest named after the bug rather than the fix is renamed.Docs. The two Lua defects #1471 fixed are no longer described as open (both probe repros pass), the finished JMPQ3 backlog item is gone, the type-class paragraphs of
WURST_LANGUAGE.mdare back under their heading, and stale claims (wurst_run.argsdefaults, the JMPQ3 pin, the macOS x64 JDK, the version file, Lua discovery order, the output channel and release command names) match the code. No en or em dashes remain.Kept on purpose:
-fixInstallationand-copyMapstay accepted, since removing them would reject existingwurst_run.argsfiles; their help now says they have no effect. Error texts are unchanged.Validation: main and test sources compile,
HelperScriptscompiles, and 58 focused test classes (2,852 tests) passed on Windows with no skips, including the Lua backend, optimizer, generics, dispatch, interpreter, LSP request and determinism suites.git diff --checkis clean. The full suite, Linux and macOS are left to CI. #1472 also editsImTranslator,AGENTS.mdandBACKLOG.md, in different places.