Skip to content

Remove dead code, duplicate helpers and orphaned test assets - #1473

Merged
Frotty merged 1 commit into
masterfrom
repo-cleanup-2026-10-16
Oct 16, 2026
Merged

Frotty merged 1 commit into
masterfrom
repo-cleanup-2026-10-16

Conversation

@Frotty

@Frotty Frotty commented Oct 16, 2026

Copy link
Copy Markdown
Member

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 in GlobalCaches, and the always-on ENABLE_SELECTIVE_GET_HANDLE_ID_SHIMMING flag, whose documented false behaviour 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 WurstValidator and ImTranslator both carried (they must agree), isConstructorThisCall (three copies), isWriteAccess, the intrinsic name and package lookups (now in IntrinsicDeclarations), handleTypeOf (now in LuaHashtable), nearestScopeName (three copies), the parameter-list text, printIndent and 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 a BugTests test 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.md are back under their heading, and stale claims (wurst_run.args defaults, 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: -fixInstallation and -copyMap stay accepted, since removing them would reject existing wurst_run.args files; their help now says they have no effect. Error texts are unchanged.

Validation: main and test sources compile, HelperScripts compiles, 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 --check is clean. The full suite, Linux and macOS are left to CI. #1472 also edits ImTranslator, AGENTS.md and BACKLOG.md, in different places.

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.
@chatgpt-codex-connector

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-16T15:46:37.524454Z 1141a86 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 d030dcf into master Oct 16, 2026
2 checks passed
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.
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