Status Update
Comments
ag...@google.com <ag...@google.com>
ze...@google.com <ze...@google.com> #2
retraced at 2.0.74:
~/.gradle/caches/transforms-2/files-2.1/99a06b4b028d9265de10c97aa4597a8e/jetified-kotlin-reflect-1.3.72.jar: R8: com.android.tools.r8.errors.CompilationError
at com.android.tools.r8.utils.ExceptionUtils.withOriginAttachmentHandler(ExceptionUtils.java:145)
at com.android.tools.r8.ir.conversion.IRConverter.rewriteCode(IRConverter.java:1068)
at com.android.tools.r8.ir.conversion.IRConverter.processMethod(IRConverter.java:1050)
at com.android.tools.r8.ir.conversion.IRConverter.lambda$optimize$4(IRConverter.java:672)
at com.android.tools.r8.utils.ThreadUtils.lambda$processItems$0(ThreadUtils.java:25)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Suppressed: java.util.concurrent.ExecutionException: com.android.tools.r8.errors.CompilationError
at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
at com.android.tools.r8.utils.ThreadUtils.awaitFutures(ThreadUtils.java:37)
at com.android.tools.r8.utils.ThreadUtils.processItems(ThreadUtils.java:29)
at com.android.tools.r8.ir.conversion.PrimaryMethodProcessor.forEachMethod(PrimaryMethodProcessor.java:147)
at com.android.tools.r8.ir.conversion.IRConverter.optimize(IRConverter.java:671)
at com.android.tools.r8.R8.run(R8.java:514)
at com.android.tools.r8.R8.run(R8.java:242)
at com.android.tools.r8.R8.lambda$runForTesting$1(R8.java:233)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:69)
at com.android.tools.r8.utils.ExceptionUtils.withR8CompilationHandler(ExceptionUtils.java:57)
at com.android.tools.r8.R8.runForTesting(R8.java:229)
at com.android.tools.r8.R8.run(R8.java:164)
at com.android.builder.dexing.R8Tool.runR8(r8Tool.kt:247)
<snip>
[CIRCULAR REFERENCE:com.android.tools.r8.errors.a]
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1208)
at java.base/java.util.TreeMap$KeyIterator.next(TreeMap.java:1262)
at com.android.tools.r8.graph.AppInfoWithSubtyping.computeMayHaveFinalizeMethodDirectlyOrIndirectlyIfAbsent(AppInfoWithSubtyping.java:765)
at com.android.tools.r8.graph.AppInfoWithSubtyping.mayHaveFinalizeMethodDirectlyOrIndirectly(AppInfoWithSubtyping.java:733)
at com.android.tools.r8.ir.code.FieldInstruction.isStoringObjectWithFinalizer(FieldInstruction.java:202)
at com.android.tools.r8.ir.code.InstancePut.instructionMayHaveSideEffects(InstancePut.java:114)
at com.android.tools.r8.ir.code.InstancePut.canBeDeadCode(InstancePut.java:129)
at com.android.tools.r8.ir.optimize.DeadCodeRemover.removeDeadInstructions(DeadCodeRemover.java:102)
at com.android.tools.r8.ir.optimize.DeadCodeRemover.run(DeadCodeRemover.java:47)
at com.android.tools.r8.ir.conversion.IRConverter.optimize(IRConverter.java:1291)
at com.android.tools.r8.ir.conversion.IRConverter.rewriteCodeInternal(IRConverter.java:1100)
at com.android.tools.r8.ir.conversion.IRConverter.lambda$rewriteCode$12(IRConverter.java:1072)
at com.android.tools.r8.utils.ExceptionUtils.withOriginAttachmentHandler(ExceptionUtils.java:141)
at com.android.tools.r8.ir.conversion.IRConverter.rewriteCode(IRConverter.java:1068)
... 9 more
bi...@google.com <bi...@google.com> #3
Yeah, happened once on a CI build, but passed the next time
ap...@google.com <ap...@google.com> #4
Branch: 2.0
commit 8f22291dc66be5e8a603fde5343df520bc638f18
Author: Rico Wind <ricow@google.com>
Date: Thu Jul 09 08:34:34 2020
Version 2.0.95
This is not a cherry pick since this class is no longer available on
master.
Make iteration of directSubtypes thread safe
If we are synthesizing a class and adding it while iterating
the directSubtypes collection we might mutate the collection
concurrently.
Bug: 160769273
Change-Id: I97f1021747b7466df979ad624e38684c3d949aa2
M src/main/java/com/android/tools/r8/Version.java
M src/main/java/com/android/tools/r8/graph/AppInfoWithSubtyping.java
vi...@squareup.com <vi...@squareup.com> #5
I landed a fix on our branch, but this might not make it into any 4.0 release before 4.1 goes stable.
4.1 has a different version of R8 that does not have this issue.
sg...@google.com <sg...@google.com> #6
Absolutely. I will land it as soon as possible. There is an internal queue on landing artifacts under com.android.tools when new version of Android Studio is staged.
ha...@gmail.com <ha...@gmail.com> #8
When I try to use
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.6'
then the build fails with the following error given for all libraries:
> Transform artifact desugar_jdk_libs-1.0.6.jar (com.android.tools:desugar_jdk_libs:1.0.6) with L8DexDesugarLibTransform
Error: Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.
> Transform artifact desugar_jdk_libs_configuration-0.12.0.jar (com.android.tools:desugar_jdk_libs_configuration:0.12.0) with L8DexDesugarLibTransform
Error: Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.
> Transform artifact kotlin-stdlib-jdk8-1.3.61.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61) with DexingWithClasspathTransform
D8: Unsupported desugared library configuration version, please upgrade the D8/R8 compiler.
etc
And the old version,
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
still uses the desugar_jdk_libs_configuration version 0.11.1, which has a broken POM
What is the upgrade path here?
sg...@google.com <sg...@google.com> #9
Thanks for trying out the new version. Unfortunately I made a mistake when releasing the 1.0.6 version as the dependency was wrong. I will release a 1.0.7 to ensure that developers does not get hit by the Android Studio auto update. That will still depend on com.android.tools:desugar_jdk_libs_configuration:0.11.1 with the broken POM. Then work on 1.0.8 which depends on a com.android.tools:desugar_jdk_libs_configuration:0.x.y with a correct POM.
This issue was also seen on StackOverflow (
ha...@lab.mobi <ha...@lab.mobi> #10
ap...@google.com <ap...@google.com> #11
Branch: 2.0
commit 430156fd9d1cbc56d7871eb7af527f366b8809ce
Author: Søren Gjesse <sgjesse@google.com>
Date: Mon Jun 22 12:42:32 2020
Version 2.0.89
The second cherry-pick below has been patched to use configuration
version 3, and have version 0.11.2.
Cherry-pick: Update POM XML for com.android.tools:desugar_jdk_libs_configuration artifact
CL:
Cherry-pick: Desugared library: fix json file
CL:
Bug: 158502561
Bug: 150188393
Change-Id: Id1d90b8c1d3c717b24679c737559c8bbcc61137f
M src/library_desugar/desugar_jdk_libs.json
M src/main/java/com/android/tools/r8/Version.java
M src/test/java/com/android/tools/r8/desugar/desugaredlibrary/DesugaredLibraryContentTest.java
M tools/create_maven_release.py
ha...@gmail.com <ha...@gmail.com> #12
Followup: the 1.0.9 version works fine for us.
Thanks for your hard work!
Description
Invalid Maven POM file for the desugar_jdk_libs_configuration artifact
Issue
See the artifact POM file for desugar_jdk_libs_configuration version 0.11.0 athttps://dl.google.com/dl/android/maven2/com/android/tools/desugar_jdk_libs_configuration/0.11.1/desugar_jdk_libs_configuration-0.11.1.pom
section:
This section omits
<dependency> .. </dependency>
tags from inside<dependencies> .. </dependencies>
.It should be
Details
Works fine if used directly from Gradle as
as detailed athttps://developer.android.com/studio/write/java8-support
But we are using the Artifactory (https://jfrog.com/artifactory/ ) as a dependency proxy in our CI setup. All CI builds use dependencies via Artifactory. And Artifactory will either return a cached dependency or fetch it from the original source and cache it and return it. This enables us to still build the app on the CI even if in an offline situation.
Artifactory is unable to download the desugar_jdk_libs_configuration befause of the invalid format: