Status Update
Comments
ze...@google.com <ze...@google.com>
be...@gmail.com <be...@gmail.com> #2
I've submitted a fix for this, which should (I hope) make it into Jellyfish Canary 12. There's a relatively straightforward workaround, which is to explicitly declare the version of the com.android.tools.build:gradle
artifact in all build files -- in the screenshot, your project has a versioned classpath
dependency, but also an unversioned one, and it's that unversioned one that tripped up the AGP Upgrade Assistant. Since there is that workaround of making sure that all the classpath dependencies on com.android.tools.build:gradle
have an explicit version, we probably won't patch this for Iguana, I'm afraid.
Thanks very much for the report!
ap...@google.com <ap...@google.com> #3
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Canary 12
- Android Gradle Plugin 8.4.0-alpha12
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ap...@google.com <ap...@google.com> #4
ap...@google.com <ap...@google.com> #5
ap...@google.com <ap...@google.com> #6
same problem in latest koala, AGP upgrade assistant never opens
Please could you open a new issue, and upload enough details about your project to be able to investigate or (ideally) reproduce the problem? Thank you!
ap...@google.com <ap...@google.com> #7
Branch: 4.0
commit 9a0e85220f3e4627d126a55ba6a778a57cecaa06
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:27:44 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #8
Branch: 8.0
commit 403e61371dae4424a32f4a83f6b39857ec1c563c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:17:27 2023
Fix inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic00ce43da9839884cbb19a87a7b43020951c3114
M src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/VirtualDispatchMethodArgumentPropagator.java
M src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #9
Branch: 8.0
commit e592e535381aef29cdec876af03b72edf76bcea7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:17:05 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #10
Branch: 8.0
commit 861eee84abaffc8e9cc736490fc81ab8f0af4c43
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:18:18 2023
Version 8.0.53
Bug:
Change-Id: Id3048216396cea527a4be16d09cfe1cf71255b6e
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #11
Branch: 8.1
commit a06a11a4e061e68789f58af4a190b5f9b4fce348
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:20:08 2023
Version 8.1.52
Bug:
Change-Id: Ibd3f99eb654f7ca7a4a912dee101f687bf8ce79d
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #12
Branch: 8.1
commit 8feec5d7abb33bf6d455d10389b9bed688f87553
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:19:58 2023
Fix inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic00ce43da9839884cbb19a87a7b43020951c3114
M src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/VirtualDispatchMethodArgumentPropagator.java
M src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #13
Branch: 8.1
commit fcc40146761d8bec9ac1c00a29c34bb5a50dfe0e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:19:39 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #14
Branch: 4.0
commit 100d0b0162ec31385e004be1fdf0e35103f5df1d
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:28:09 2023
Fix inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic00ce43da9839884cbb19a87a7b43020951c3114
M src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/VirtualDispatchMethodArgumentPropagator.java
M src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #15
Branch: 4.0
commit 9a0e85220f3e4627d126a55ba6a778a57cecaa06
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:27:44 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #16
Branch: 8.0
commit 403e61371dae4424a32f4a83f6b39857ec1c563c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:17:27 2023
Fix inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic00ce43da9839884cbb19a87a7b43020951c3114
M src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/VirtualDispatchMethodArgumentPropagator.java
M src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #17
Branch: 8.0
commit e592e535381aef29cdec876af03b72edf76bcea7
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:17:05 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ch...@google.com <ch...@google.com>
ap...@google.com <ap...@google.com> #18
Branch: 4.0
commit 100d0b0162ec31385e004be1fdf0e35103f5df1d
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:28:09 2023
Fix inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic00ce43da9839884cbb19a87a7b43020951c3114
M src/main/java/com/android/tools/r8/optimize/argumentpropagation/propagation/VirtualDispatchMethodArgumentPropagator.java
M src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
ap...@google.com <ap...@google.com> #19
Branch: 4.0
commit 9a0e85220f3e4627d126a55ba6a778a57cecaa06
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed May 31 11:27:44 2023
Reproduce inadequate argument propagation in presence of join types
Bug:
Change-Id: Ic1ad298f99b286d681b52b338349a2d4510610bd
A src/test/java/com/android/tools/r8/optimize/argumentpropagation/ArgumentPropagationUpperBoundWithInterfacesTest.java
be...@gmail.com <be...@gmail.com> #20
ch...@google.com <ch...@google.com> #21
No this was fixed in R8 4.0.63. You can build with this version by adding the following to settings.gradle
:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:4.0.63")
}
}
}
Description
In R8 4.0.54, the method is as follows:
private boolean shouldActivateMethodStateGuardedByBounds(
ClassTypeElement upperBound, DexProgramClass currentClass, DexProgramClass superClass) {
ClassTypeElement classType =
TypeElement.fromDexType(currentClass.getType(), maybeNull(), appView).asClassType();
// When propagating argument information for interface methods downwards from an interface to
// a non-interface we need to account for the parent classes of the current class.
if (superClass.isInterface()
&& !currentClass.isInterface()
&& currentClass.getSuperType() != appView.dexItemFactory().objectType) {
return classType.lessThanOrEqualUpToNullability(upperBound, appView);
}
return classType.equalUpToNullability(upperBound);
}
But there is a corner case, i.e upperBound and classType point to the same class, while classType.equalUpToNullability(upperBound); return false. And the reason is that upperBound has more interfaces than classType because of some vertical optimization.
As a result, some virtual method will be thought not reachable and put into throw null in method's body.