Status Update
Comments
mk...@google.com <mk...@google.com> #2
Thanks for opening an issue on this. I believe we should not fail compilation if one is using a public api so we should definetely figure out what the error is here.
Looks like the gradle invocation is an invocation having class files as output?
tool=R8
mode=release
min-api=1 <-- this and desugar-state=OFF is what leads me to believe this has class-files as output.
optimize-multidex-for-linear-alloc=false
desugar-state=OFF
where, if you are running with R8 in bazel you are asking R8 to desugar in a CF pipeline:
tool=R8
mode=release
min-api=21
optimize-multidex-for-linear-alloc=false
desugar-state=ON
as far as I know, that is actually not a supported pipeline. There should not be a need to desugar your the class file output because it will be later when generating dex.
You can share a dump with
br...@snapchat.com <br...@snapchat.com> #3
Ah, ignore that comment about the Gradle / Bazel properties. The Gradle dump corresponded to R8 being ran to generate an AAR and not our main app. Comparing the properties from our main app in Gradle vs Bazel, the values are consistent.
I shared the dump over email.
mk...@google.com <mk...@google.com> #4
FIY, this does not reproduce on ToT but it reproduces on the 4.0 branch, so will figure out what has changed and backport/cherry-pick a fix.
ap...@google.com <ap...@google.com> #5
Branch: main
commit e1eaad36ea07e23f5c9d2bdfe00d46f730782e49
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Mon Oct 10 13:27:37 2022
Add regression test for moving instance get over definition
Bug:
Change-Id: Ifa14d902fba81ca85bdfe9a71d4c719666415e33
A src/test/java/com/android/tools/r8/ir/optimize/canonicalization/InstanceGetOnCheckCastCompareLongTest.java
ap...@google.com <ap...@google.com> #6
Branch: main
commit 90a926a1dd3b76382216b30d1ff49d49aa3da66b
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Tue Oct 11 11:40:44 2022
Check for compare when shorting live ranges for instance-get
Bug:
Change-Id: Ia914ba6c4cc1e54686299cc2ce50bb06d1ee2718
M src/test/java/com/android/tools/r8/ir/optimize/canonicalization/InstanceGetOnCheckCastCompareLongTest.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
ap...@google.com <ap...@google.com> #7
Branch: 4.0
commit 456b3c2cf7e94775d5cadeffad09ad8503b3cace
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Oct 12 12:29:55 2022
Version 4.0.33
Bug:
Change-Id: I2eea96d343a364d6019f23a143c90b413e1d737a
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #8
Branch: 4.0
commit c83bb4906a80f23b7dd065d4414a0459129a9613
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Oct 12 12:29:47 2022
Check for compare when shorting live ranges for instance-get
Bug:
Change-Id: Ia914ba6c4cc1e54686299cc2ce50bb06d1ee2718
M src/test/java/com/android/tools/r8/ir/optimize/canonicalization/InstanceGetOnCheckCastCompareLongTest.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
ap...@google.com <ap...@google.com> #9
Branch: 4.0
commit b9e7c49fc29b8567a8f2dd57faa5dbbd1b4c1f39
Author: Morten Krogh-Jespersen <mkroghj@google.com>
Date: Wed Oct 12 12:29:40 2022
Add regression test for moving instance get over definition
Bug:
Change-Id: Ifa14d902fba81ca85bdfe9a71d4c719666415e33
A src/test/java/com/android/tools/r8/ir/optimize/canonicalization/InstanceGetOnCheckCastCompareLongTest.java
mk...@google.com <mk...@google.com> #10
This issue should be fixed from version 4.0.33:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:4.0.33")
}
}
}
I was able to compile the dump with this version, but if you see other errors please let me know.
Description
Background
After upgrading from R8 3.3 -> R8 4.0, we are seeing a crash at compile time in R8 for our Bazel R8 builds.
We have our own custom implementation of Bazel in R8 which can be found here:https://github.com/bazelbuild/bazel/pull/14741 .
Subsequently, here is the logic that constructs thehttps://gist.github.com/mauriciogg/6e7217f03a19a40979f23ca1e5eff297
R8Command
:Possibly, there is a mis-configuration of how we are constructing the
R8Command
? I did notice the properties are different between Gradle and Bazel.Bazel:
Gradle:
Issue
We are seeing the following stacktrace:
I was able to get Bazel to produce a dump and I can share that over email.