Status Update
Comments
cm...@google.com <cm...@google.com> #2
fwiw: I've seen (variations of) this very small difference in various apps:
│ │ ├── j$/util/Collection$-EL.class
│ │ │ ├── procyon -ec {}
│ │ │ │ @@ -1,14 +1,14 @@
│ │ │ │
│ │ │ │ package j$.util;
│ │ │ │
│ │ │ │ import java.util.Comparator;
│ │ │ │ import java.util.Set;
│ │ │ │ -import java.util.List;
│ │ │ │ import java.util.SortedSet;
│ │ │ │ +import java.util.List;
│ │ │ │ import java.util.LinkedHashSet;
│ │ │ │ import java.util.Iterator;
│ │ │ │ import java.util.Objects;
│ │ │ │ import j$.util.function.Consumer;
│ │ │ │ import java.util.Collection;
│ │ │ │ import java.util.OptionalLong;
│ │ │ │ import java.util.OptionalInt;
│ │ │ │ @@ -142,20 +142,20 @@
│ │ │ │ return ((j$.util.Collection)collection).spliterator();
│ │ │ │ }
│ │ │ │ if (collection instanceof LinkedHashSet) {
│ │ │ │ final LinkedHashSet obj = (LinkedHashSet)collection;
│ │ │ │ Objects.requireNonNull(obj);
│ │ │ │ return (Spliterator)new Spliterators$IteratorSpliterator((Collection)obj, 17);
│ │ │ │ }
│ │ │ │ + if (collection instanceof List) {
│ │ │ │ + return List$-CC.$default$spliterator((List)collection);
│ │ │ │ + }
│ │ │ │ if (collection instanceof SortedSet) {
│ │ │ │ final SortedSet set = (SortedSet)collection;
│ │ │ │ return (Spliterator)new SortedSet$1(set, (Collection)set, 21);
│ │ │ │ }
│ │ │ │ - if (collection instanceof List) {
│ │ │ │ - return List$-CC.$default$spliterator((List)collection);
│ │ │ │ - }
│ │ │ │ if (collection instanceof Set) {
│ │ │ │ return Set$-CC.$default$spliterator((Set)(SortedSet)collection);
│ │ │ │ }
│ │ │ │ return Collection$-CC.$default$spliterator(collection);
│ │ │ │ }
│ │ │ │ }
cm...@google.com <cm...@google.com> #3
Hey Clement, do you have any ideas on producing different dex files from build to build?
au...@google.com <au...@google.com> #4
The example shown above matches a non deterministic issue we had in L8 for classes ending with $-EL. This issue should be fixed on tip of tree. If you can reproduce on ToT let us know, I'll work on another fix. If the changes include something else than ordering inside the $-EL methods, let us know too, that would need to be fixed.
cm...@google.com <cm...@google.com> #5
How do I use this "tip of tree"?
cm...@google.com <cm...@google.com> #6
I'd also be interesting in seeing the fix. Could you link the relevant commit?
sp...@google.com <sp...@google.com>
au...@google.com <au...@google.com> #8
Before BumbleBee, you can try the latest version 3.1.16-dev by adding to your gradle script:
repositories {
maven {
url 'https://storage.googleapis.com/r8-releases/raw'
}
}
dependencies {
classpath 'com.android.tools:r8:3.1.16-dev' // Must be before the Gradle Plugin for Android.
classpath 'com.android.tools.build:gradle:X.Y.Z' // Your current AGP version.
}
Since BumbleBee, the syntax is
repositories {
google()
mavenCentral()
maven {url 'https://storage.googleapis.com/r8-releases/raw'}
}
dependencies {
classpath 'com.android.tools:r8:3.1.16-dev'
}
You can also try ToT directly but using the latest dev version that we release once a week is safest (ToT may be quite unstable sometimes)
au...@google.com <au...@google.com> #9
Thanks for sharing the instructions on how to testing with dev version of r8, Clement!
To reporter, could you try it out with dev version of r8 and see if you still see the difference? I didn't find where you enable core library desugaring in you sample project(debug_reproducible_builds branch) and you are using Android Gradle Plugin 4.2.2 instead of 7.0.
sp...@google.com <sp...@google.com> #10
In order to eventually remove the unstable version of r8 again. What software release should we looking out for? build-tools? AGP?
sp...@google.com <sp...@google.com> #11
Looking at the diffoscope output from the APKs linked in the salsa issue by OP, that seems like a different issue than the "classes ending with $-EL"; I mostly see things like this there:
├── smali_classes4/de/rki/coronawarnapp/util/encoding/Base45Decoder.smali
│┄ Ordering differences only
│ @@ -50,17 +50,17 @@
│ "(Ljava/math/BigInteger;I)J",
│ "",
│ "encode",
│ "([B)Ljava/lang/String;",
│ "decode",
│ "(Ljava/lang/String;)[B",
│ "kotlin.jvm.PlatformType",
│ - "int45",
│ - "Ljava/math/BigInteger;",
│ "int256",
│ + "Ljava/math/BigInteger;",
│ + "int45",
│ "alphabet",
│ "Ljava/lang/String;",
│ "<init>",
│ "()V",
│ "Corona-Warn-App_deviceRelease"
│ }
│ k = 0x1
sp...@google.com <sp...@google.com> #12
@bingran unless you've found a reason why the issue would come from gradle, I now suspect that this issue comes from R8 and you can assign it to me. I will investigate tomorrow.
Description
Running lint at head on androidx integration branch gives the folloeing
the library group encoded seems wrong (IIUC
artifacts
doesn't make sense, it should beandroidx.ads
)and