Status Update
Comments
au...@google.com <au...@google.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).
em...@google.com <em...@google.com>
je...@google.com <je...@google.com>
am...@google.com <am...@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
I ran into a problem with a new test module in an AndroidX build. The presubmit failed and I was able to reproduce the error by running this:
$ ./gradlew -Pandroidx.validateNoUnrecognizedMessages --rerun-tasks :graphics:integration-tests:testapp:processDebugMainManifest :graphics:integration-tests:testapp:processReleaseMainManifest
This resulted in the following failure:
There are 2 problems with this as an error message (or warning message, which is effectively the same thing since AndroidX presubmit fails on this warning):
It turned out that the problem was that my module was using the same package name as the library that it was testing, and apparently I needed to use a unique package name (for reasons I don't understand). Once I moved the files into a "test" sub-package and then changed the string in my build.gradle file, it all worked.
The request here is to provide more information in the error message so that I could diagnose and fix this one my own (rather than reaching out to the AndroidX team to help).
In case it helps, here is my CL where you can see the changes before/after the fix:https://android-review.git.corp.google.com/c/platform/frameworks/support/+/2212660