Status Update
Comments
ko...@gmail.com <ko...@gmail.com> #2
I can reproduce this (thanks for the repro project!)
It looks like the problem is that the desugared api list from r8 contains this entry:
java/util/Collection#removeIf(Ljava/util/function/Predicate;)Z
but the bytecode here doesn't match -- it's java/util/ArrayList. Collection isn't a directly implemented interface or a direct super class, it's an interface on the super super class. The most efficient thing runtime wise would be for the signature list to inline this method on all implemented subclasses. But I should probably at least for now go and make the desugared API lookup do something similar to what it does for API lookup -- search through all super classes and interfaces as well. This isn't a new problem, so I'm very surprised this hasn't come up before (or it has, and I've forgotten).
hu...@google.com <hu...@google.com>
ya...@google.com <ya...@google.com>
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #3
(I have a pending CL that was working to improve the handling of fields now that r8 handles desugaring fields, I'll try to dust that off and combine the fix in there.)
Description
Using android-lint 8.2.0-alpha11, we are seeing warnings "UseTomlInstead" when adding a project dependency, such as "api project(':myproject')". This is a false positive.
STEPS TO REPRODUCE:
1. In gradle.properties, put "android.experimental.lint.version = 8.2.0-alpha11"
2. In build.gradle, use a project dependency, such as "api project(':myproject')"
3. Run ./gradlew lintDebug
------------------
IMPORTANT: Please read
all required information.
------------------
Studio Build: Android Studio Flamingo | 2022.2.1 Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
Version of Gradle Plugin: 8.0.2
Version of Gradle: 8.0.2
Version of Java: 17.0.5
OS: Ventura 13.4.1