Status Update
Comments
xa...@google.com <xa...@google.com>
je...@google.com <je...@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);
│ │ │ │ }
│ │ │ │ }
je...@google.com <je...@google.com> #3
Hey Clement, do you have any ideas on producing different dex files from build to build?
je...@google.com <je...@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.
sa...@google.com <sa...@google.com> #5
How do I use this "tip of tree"?
sa...@google.com <sa...@google.com> #6
I'd also be interesting in seeing the fix. Could you link the relevant commit?
il...@gmail.com <il...@gmail.com> #7
I will try it out with tip of the tree.
hj...@gmail.com <hj...@gmail.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)
eg...@gmail.com <eg...@gmail.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.
Description
gradle :app:assembleRelease --configuration-cache
the build fails because the file produced byVersionCodeTask
hasn't been created yet.I'm assuming this is happening because something in AGP is calling
versionCode.get()
during configuration, but I haven't found anything in the source.