Skip to content

Fix master build: FunctionFactsTests reads variables, not used variables - #1477

Merged
Frotty merged 1 commit into
masterfrom
fix-function-facts-test
Oct 17, 2026
Merged

Frotty merged 1 commit into
masterfrom
fix-function-facts-test

Conversation

@Frotty

@Frotty Frotty commented Oct 17, 2026

Copy link
Copy Markdown
Member

Master's tests do not compile since 0e48e96 (CI run 39007986701, and every PR branched from it):

FunctionFactsTests.java:121: error: cannot find symbol  calculateCallRelationsAndUsedVariables()
FunctionFactsTests.java:127: error: cannot find symbol  getUsedVariables()

#1473 removed those two ImTranslator methods as dead code, and #1472, merged right after it, added movedStatementsInvalidateBothFunctions, which calls them. Each was green on its own.

Nothing in the compiler computes used variables any more, so the test now uses calculateCallRelationsAndReadVariables(), the path the garbage removal takes, and drops the used-variables assertion. It still checks what it is named for: after statements move from one function to another, both functions' set statements are refreshed and the read variable is still found.

Validation: ./gradlew test --tests tests.wurstscript.tests.FunctionFactsTests compiles the test sources and passes all 6 tests.

Left as is: ImTranslator.calculateCallRelationsAndVariables(boolean includeUsedVariables) still has the used-variables branch (usedVariablesOf, the usedVariables field and fact), which nothing calls with true now.

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

chatgpt-codex-connector Bot commented Oct 17, 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-17T07:02:49.493183Z eee4d85 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 0d7df32 into master Oct 17, 2026
2 checks passed
@Frotty
Frotty deleted the fix-function-facts-test branch October 17, 2026 07:10
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