-
-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Most appropriate sub-area of Processing 4?
Unit testing
Processing version
4.3.4
Operating system
MacOS, Windows, Linux
Bug description
Local testing is broken, creating a classpath issue with an an "undefined" module in gradle. Surprisingly, this does not fail on github CI. It does fail on windows, macos, (tested by me and my students) and linux (as tested by @catilac )
The issue was introduced in PR #1423
The issue appears to stem from Github changing their gradle version and @moon is working on a long-term solution to bring local testing into parity with PR #1459 (if I understood all this right)
Steps to reproduce this
Check out main branch. Try to run tests:
> ./gradlew clean
> ./gradlew test
Will see:
> Task :java:gradle:test
ProcessingPluginTest > testJavaSourceFile FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ProcessingPluginTest.kt:34
ProcessingPluginTest > testImportingLibrary FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ProcessingPluginTest.kt:34
ProcessingPluginTest > testSinglePDE FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ProcessingPluginTest.kt:34
ProcessingPluginTest > testMultiplePDE FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ProcessingPluginTest.kt:34
ProcessingPluginTest > testWithUnsavedSource FAILED
org.gradle.testkit.runner.UnexpectedBuildFailure at ProcessingPluginTest.kt:34
7 tests completed, 5 failed
> Task :java:gradle:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java:gradle:test'.
> There were failing tests. See the report at: file:///Users/shermanm/git/processing4/java/gradle/build/reports/tests/test/index.html
* Try:
> Run with --scan to get full insights.
BUILD FAILED in 7s
66 actionable tasks: 2 executed, 64 up-to-date
Diving into the report link, you'll find the modules all fail:
- ProcessingPluginTest. testImportingLibrary
- ProcessingPluginTest. testJavaSourceFile
- ProcessingPluginTest. testMultiplePDE
- ProcessingPluginTest. testSinglePDE
- ProcessingPluginTest. testWithUnsavedSource
Clicking into their reports, they fail with the same core issue in the middle: Could not resolve all files for configuration ':compileClasspath'. Could not find org.processing:core:unspecified.
Here's one full report:
org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /var/folders/l2/l_2__0cx0_3f0vy9c53zbw401lm217/T/junit15354415828793566169/sketch with arguments [build]
Output:
> Task :preprocessPDE
> Task :scanLibrariesPDE
> Task :addLegacyDependenciesPDE
> Task :checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :convertXmlValueResourcesForMain NO-SOURCE
> Task :copyNonXmlValueResourcesForMain NO-SOURCE
> Task :prepareComposeResourcesTaskForMain NO-SOURCE
> Task :generateResourceAccessorsForMain SKIPPED
> Task :generateActualResourceCollectorsForMain SKIPPED
> Task :generateComposeResClass SKIPPED
> Task :compileKotlin NO-SOURCE
> Task :compileJava FAILED
[Incubating] Problems report is available at: file:///private/var/folders/l2/l_2__0cx0_3f0vy9c53zbw401lm217/T/junit15354415828793566169/sketch/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.processing:core:unspecified.
Searched in the following locations:
- https://jogamp.org/deployment/maven/org/processing/core/unspecified/core-unspecified.pom
- https://repo.maven.apache.org/maven2/org/processing/core/unspecified/core-unspecified.pom
- file:/Users/shermanm/.m2/repository/org/processing/core/unspecified/core-unspecified.pom
Required by:
root project :
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.11/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 481ms
4 actionable tasks: 4 executed
at app//org.gradle.testkit.runner.internal.DefaultGradleRunner.lambda$build$2(DefaultGradleRunner.java:274)
at app//org.gradle.testkit.runner.internal.DefaultGradleRunner.run(DefaultGradleRunner.java:367)
at app//org.gradle.testkit.runner.internal.DefaultGradleRunner.build(DefaultGradleRunner.java:272)
at app//ProcessingPluginTest.createTemporaryProcessingSketch(ProcessingPluginTest.kt:34)
at app//ProcessingPluginTest.testWithUnsavedSource(ProcessingPluginTest.kt:195)
at java.base@17.0.17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base@17.0.17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base@17.0.17/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@17.0.17/java.lang.reflect.Method.invoke(Method.java:569)
at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at app//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at app//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at app//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at app//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at app//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at app//org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:112)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:54)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:53)
at java.base@17.0.17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base@17.0.17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base@17.0.17/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@17.0.17/java.lang.reflect.Method.invoke(Method.java:569)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:92)
at jdk.proxy1/jdk.proxy1.$Proxy4.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:183)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:132)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:103)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:63)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:121)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Thanks to git bisect I've isolated this as the offending commit, merged in PR #1423 :
821d62c5e43b8e4e72aa2cb4fae56d092ef98c94 is the first bad commit
commit 821d62c5e43b8e4e72aa2cb4fae56d092ef98c94
Author: Stef Tervelde <stef@steftervelde.nl>
Date: Tue Feb 10 01:25:49 2026 +0100
Write and load version.properties for plugin (#1423)
Add a writeVersion Gradle task that writes project.version to build/resources/main/version.properties, so the plugin can access the project version at runtime. This way the version number of the plugin and the used version of processing.core will be the same.
java/gradle/build.gradle.kts | 12 ++++++++++++
java/gradle/src/main/kotlin/ProcessingPlugin.kt | 5 ++++-
2 files changed, 16 insertions(+), 1 deletion(-)
This was written by @Stefterv . I'll reproduce the conversation from the discord below.
snippet
No response
Additional context
This was discussed in the Discord devs-chat channel. Reproduced here to not be forgotten!
Ah the Gradle Plugin uses the local version of org.processing:core:unspecified to run tests, which seems to not have been build/referenced. I suspected a missing dependency on one of the required gradle tasks
Oh lovely
:coreneeds to be signed for that to work
And we don't do signing in tests for obv reasons
Also the published gradle plugins disappeared from their verification so I suspect there should've been an email on the processing-bot email about why
Would you like to work on the issue?
I’m not sure yet