gradle / gradle-profiler

A tool for gathering profiling and benchmarking information for Gradle builds
Apache License 2.0
1.42k stars 156 forks source link

Crash with android-studio-sync in 0.21.17-alpha* #549

Open handstandsam opened 8 months ago

handstandsam commented 8 months ago

0.21.17+ versions no longer allow Android Studio Sync Profiling with Android Studio Iguana on Mac (M1) with Ventura. The last working release was 0.21.0-alpha-4 that supported Android Studio Sync benchmarking. Confirmed (via local testing between versions of gradle-profiler).

All versions tried are from the binary .zip files hosted here: https://repo1.maven.org/maven2/org/gradle/profiler/gradle-profiler/

Crash:

* Stopping daemons
java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:208)
    at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:263)
    at java.base/java.nio.file.Path.of(Path.java:147)
    at org.gradle.profiler.ScenarioLoader.newStudioGradleScenarioDefinition(ScenarioLoader.java:322)
    at org.gradle.profiler.ScenarioLoader.loadScenarios(ScenarioLoader.java:303)
    at org.gradle.profiler.ScenarioLoader.doLoadScenarios(ScenarioLoader.java:181)
    at org.gradle.profiler.ScenarioLoader.loadScenarios(ScenarioLoader.java:162)
    at org.gradle.profiler.Main.run(Main.java:68)
    at org.gradle.profiler.Main.main(Main.java:37)

To replicate, use:

./gradle-profiler --benchmark --scenario-file android-studio.scenarios studio_sync --studio-install-dir "${YOUR_PATH_HERE}/Iguana/Android Studio.app"

android-studio.scenarios

studio_sync {
    title = "Android Studio Sync"
    android-studio-sync {
    }
    warm-ups = 1
    iterations = 1
 }

NOTE: The 0.21.0-alpha-4 has also been confirmed to work with the Android Studio Jellyfish | 2023.3.1 Canary 13, but not with 0.21.17* versions.

joshfriend commented 8 months ago

This is the commit that breaks the sync scenarios: https://github.com/gradle/gradle-profiler/commit/343774faca54f636d78641b255364b55f9bbd47c

It appears that the 0.21.17 versions are from an un-merged branch and are possibly testing versions?

asodja commented 8 months ago

Yes, that was a mistake on our end. Please ignore these versions and use only 0.21.0-alpha-* versions.

Also next stable will be 0.21.0 and after 0.22.0: meaning that there won't be any 0.21.17 stable version.

joshfriend commented 8 months ago

next stable will be 0.21.0

That will sort lower than 0.21.17. If you want to be sure these bad versions wont cause any problems for tools like Renovate, you might have to skip 0.21.0 stable entirely and go straight to 0.22.0. Or release as 0.21.18 which seems more confusing.