Skip to content

Fix Scala Gradle classpath pollution#3815

Open
wenytang-ms wants to merge 3 commits into
eclipse-jdtls:mainfrom
wenytang-ms:fix-gradle-scala-classpath-clean
Open

Fix Scala Gradle classpath pollution#3815
wenytang-ms wants to merge 3 commits into
eclipse-jdtls:mainfrom
wenytang-ms:fix-gradle-scala-classpath-clean

Conversation

@wenytang-ms

Copy link
Copy Markdown
Contributor

Limit Scala Gradle classpath augmentation to Scala projects and avoid adding Gradle project dependency artifacts as raw build/libs entries.

Also keeps Gradle resources visible on the classpath and adds a multi-project Scala Gradle fixture covering project dependencies, resources, and Java-to-Scala references.

Supersedes #3776.

Related issues:

@wenytang-ms

wenytang-ms commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@datho7561 I have create a new PR and close the original one, can you share why the Jenkinds build failed because I don't have account to see the running error.

@jjohnstn

Copy link
Copy Markdown
Contributor

The failure was for SyntaxServerTest: It fails for me without your patch.

Error Details

expected: <Syntax error, insert ";" to complete FieldDeclaration> but was: <Either [
left = Syntax error, insert ";" to complete FieldDeclaration
right = null
]>

Stack Trace

org.opentest4j.AssertionFailedError:
expected: <Syntax error, insert ";" to complete FieldDeclaration> but was: <Either [
left = Syntax error, insert ";" to complete FieldDeclaration
right = null
]>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)
at org.eclipse.jdt.ls.core.internal.syntaxserver.SyntaxServerTest.testSyntaxDiagnostics(SyntaxServerTest.java:163)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

@wenytang-ms

Copy link
Copy Markdown
Contributor Author

The failure was for SyntaxServerTest: It fails for me without your patch.

Error Details

expected: <Syntax error, insert ";" to complete FieldDeclaration> but was: <Either [ left = Syntax error, insert ";" to complete FieldDeclaration right = null ]>

Stack Trace

org.opentest4j.AssertionFailedError: expected: <Syntax error, insert ";" to complete FieldDeclaration> but was: <Either [ left = Syntax error, insert ";" to complete FieldDeclaration right = null ]> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145) at org.eclipse.jdt.ls.core.internal.syntaxserver.SyntaxServerTest.testSyntaxDiagnostics(SyntaxServerTest.java:163) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

@jjohnstn @datho7561 that's great, please take a look into this PR.

@jjohnstn

Copy link
Copy Markdown
Contributor

@wenytang-ms I already fixed the test failure.

@jjohnstn jjohnstn force-pushed the fix-gradle-scala-classpath-clean branch from 40651d0 to 497f31b Compare June 23, 2026 19:44
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.

2 participants