square / gradle-dependencies-sorter

A CLI app and Gradle plugin to sort the dependencies in your Gradle build scripts
Apache License 2.0
257 stars 12 forks source link

java invoke fails on 0.9 with no information #122

Open madisp opened 2 days ago

madisp commented 2 days ago

After upgrading to 0.9 running on one of the modules fails with non-zero exit value 2:

./gradlew :gate:gate:checkSortDependencies

Type-safe project accessors is an incubating feature.
> Task :gate:gate:checkSortDependencies FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gate:gate:checkSortDependencies'.
> Process 'command '/Users/madis/.asdf/installs/java/zulu-21.30.15/zulu-21.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

I ran with --debug, hoping to get more info, but not much more there:

2024-10-12T10:56:09.175+0300 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/Users/madis/.asdf/installs/java/zulu-21.30.15/zulu-21.jdk/Contents/Home/bin/java''. Working directory: /Volumes/src/warp-speed/gate/gate Command: /Users/madis/.asdf/installs/java/zulu-21.30.15/zulu-21.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Duser.country=GB -Duser.language=en -Duser.variant -cp /Users/madis/.gradle/caches/modules-2/files-2.1/com.squareup/sort-gradle-dependencies-app/0.9/9bacf36ccab08ee75e854ea1a9909c0f59c85c64/sort-gradle-dependencies-app-0.9-all.jar com.squareup.sort.MainKt /Volumes/src/warp-speed/gate/gate/build.gradle.kts --mode check --context gradle
2024-10-12T10:56:09.175+0300 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
2024-10-12T10:56:09.175+0300 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command '/Users/madis/.asdf/installs/java/zulu-21.30.15/zulu-21.jdk/Contents/Home/bin/java'.
2024-10-12T10:56:09.179+0300 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
2024-10-12T10:56:09.179+0300 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
2024-10-12T10:56:09.179+0300 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/Users/madis/.asdf/installs/java/zulu-21.30.15/zulu-21.jdk/Contents/Home/bin/java''
2024-10-12T10:56:10.380+0300 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
madisp commented 2 days ago

ok, the dependency sort rules in that module changed - after running ./gradlew :gate:gate:sortDependencies it passed. But a message or something would've been helpful :)

autonomousapps commented 1 day ago

But a message or something would've been helpful :)

Huh... it's supposed to!

madisp commented 1 day ago

hmm, I can dig some more as I can reproduce this easily. Which part is supposed to do the printing, the wrapped CLI (com.squareup.sort.MainKt) or the Gradle plugin?