Verified
Status Update
Comments
ch...@google.com <ch...@google.com> #2
This is a good idea and definitely worth investigating.
I think there's something to be said about what scope these coroutines would run in, but it should be possible to pass it back from adapter internally.
ch...@google.com <ch...@google.com> #3
Thanks for the suggestion!
sg...@google.com <sg...@google.com>
da...@spotify.com <da...@spotify.com> #4
I was thinking of something more upstream. I may be wrong, because I'm just getting started with this new library
Using the scope of the adapter in case of a configuration change would cancel the coroutine, and the cachedIn operator wouldn't cache the mapped value, and some operations would have to be done multiple times.
Maybe using the scope on the producing side of the PageEvents, like in PageFetcher, could be an option.
Using the scope of the adapter in case of a configuration change would cancel the coroutine, and the cachedIn operator wouldn't cache the mapped value, and some operations would have to be done multiple times.
Maybe using the scope on the producing side of the PageEvents, like in PageFetcher, could be an option.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit debb2cb10010710d92c0da93b7ea6870fbc4d834
Author: Dustin Lam <dustinlam@google.com>
Date: Fri Jun 26 19:45:32 2020
Add suspend version of transform functions
RelNote: "Made existing PagingData operators accept suspending methods
and introduced new mapSync, flatMapSync, and filterSync non-suspending
operators for Java users. The existing transformation methods have been
moved to extension functions so Kotlin users will need to import them."
Fixes: 159983232
Test: ./gradlew paging:paging-common:test
Change-Id: I342390a7b1eb98ac87072998744a9e46c99a1000
M paging/common/api/3.0.0-alpha03.txt
M paging/common/api/current.txt
M paging/common/api/public_plus_experimental_3.0.0-alpha03.txt
M paging/common/api/public_plus_experimental_current.txt
M paging/common/api/restricted_3.0.0-alpha03.txt
M paging/common/api/restricted_current.txt
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/main/kotlin/androidx/paging/PagingData.kt
M paging/common/src/main/kotlin/androidx/paging/Separators.kt
M paging/common/src/test/kotlin/androidx/paging/PageEventTest.kt
M paging/common/src/test/kotlin/androidx/paging/SeparatorsTest.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3/V3Activity.kt
M paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt
M paging/samples/src/main/java/androidx/paging/samples/InsertSeparatorsUiModelSample.kt
M paging/samples/src/main/java/androidx/paging/samples/java/InsertSeparatorsJavaUiModelSample.java
https://android-review.googlesource.com/1350688
Branch: androidx-master-dev
commit debb2cb10010710d92c0da93b7ea6870fbc4d834
Author: Dustin Lam <dustinlam@google.com>
Date: Fri Jun 26 19:45:32 2020
Add suspend version of transform functions
RelNote: "Made existing PagingData operators accept suspending methods
and introduced new mapSync, flatMapSync, and filterSync non-suspending
operators for Java users. The existing transformation methods have been
moved to extension functions so Kotlin users will need to import them."
Fixes: 159983232
Test: ./gradlew paging:paging-common:test
Change-Id: I342390a7b1eb98ac87072998744a9e46c99a1000
M paging/common/api/3.0.0-alpha03.txt
M paging/common/api/current.txt
M paging/common/api/public_plus_experimental_3.0.0-alpha03.txt
M paging/common/api/public_plus_experimental_current.txt
M paging/common/api/restricted_3.0.0-alpha03.txt
M paging/common/api/restricted_current.txt
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/main/kotlin/androidx/paging/PagingData.kt
M paging/common/src/main/kotlin/androidx/paging/Separators.kt
M paging/common/src/test/kotlin/androidx/paging/PageEventTest.kt
M paging/common/src/test/kotlin/androidx/paging/SeparatorsTest.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3/V3Activity.kt
M paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt
M paging/samples/src/main/java/androidx/paging/samples/InsertSeparatorsUiModelSample.kt
M paging/samples/src/main/java/androidx/paging/samples/java/InsertSeparatorsJavaUiModelSample.java
da...@spotify.com <da...@spotify.com> #6
Nice! Let me know which release I can test it against. Is it going into the 3.2.x branch?
ap...@google.com <ap...@google.com> #7
Project: r8
Branch: 3.3
commit c0e7efd5845505e01b1ee44fb6b5d2dcd1761f6e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:33:58 2022
Version 3.3.63
Bug: b/236615030
Change-Id: I19e9380714fee56e666c05bc99b247975e77f747
M src/main/java/com/android/tools/r8/Version.java
https://r8-review.googlesource.com/69258
Branch: 3.3
commit c0e7efd5845505e01b1ee44fb6b5d2dcd1761f6e
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:33:58 2022
Version 3.3.63
Bug:
Change-Id: I19e9380714fee56e666c05bc99b247975e77f747
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #8
Project: r8
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69257
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ap...@google.com <ap...@google.com> #9
Project: r8
Branch: 3.2
commit e63b2dac1dfd5ea22e3ec5e26fcb5534a4836c22
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:57 2022
Version 3.2.71
Bug: b/236615030
Change-Id: Ic46f2a5a677408946de06c99e549d7f3e80f9282
M src/main/java/com/android/tools/r8/Version.java
https://r8-review.googlesource.com/69260
Branch: 3.2
commit e63b2dac1dfd5ea22e3ec5e26fcb5534a4836c22
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:57 2022
Version 3.2.71
Bug:
Change-Id: Ic46f2a5a677408946de06c99e549d7f3e80f9282
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #10
Project: r8
Branch: 3.2
commit e55131270b332d032c15cc067718fd348784bd86
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:20 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69259
Branch: 3.2
commit e55131270b332d032c15cc067718fd348784bd86
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:20 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ap...@google.com <ap...@google.com> #11
Project: r8
Branch: 3.1
commit 659ad95323dcda252c852b47817ec946d379c625
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:35:52 2022
Version 3.1.80
Bug: b/236615030
Change-Id: I4eff1308d96a600cb816d4b610e1e5cf17e0c5c8
M src/main/java/com/android/tools/r8/Version.java
https://r8-review.googlesource.com/69262
Branch: 3.1
commit 659ad95323dcda252c852b47817ec946d379c625
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:35:52 2022
Version 3.1.80
Bug:
Change-Id: I4eff1308d96a600cb816d4b610e1e5cf17e0c5c8
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #12
Project: r8
Branch: 3.1
commit 4e672f5cb21059b5bafb32f2677e06008ac45568
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:35:17 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69261
Branch: 3.1
commit 4e672f5cb21059b5bafb32f2677e06008ac45568
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:35:17 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ap...@google.com <ap...@google.com> #13
Project: r8
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69257
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ap...@google.com <ap...@google.com> #14
Project: r8
Branch: 3.2
commit e55131270b332d032c15cc067718fd348784bd86
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:20 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69259
Branch: 3.2
commit e55131270b332d032c15cc067718fd348784bd86
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:34:20 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ap...@google.com <ap...@google.com> #15
Project: r8
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
https://r8-review.googlesource.com/69257
Branch: 3.3
commit 03af92b0a390d7ce622e5554a7315edeb4421d1c
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:32:59 2022
Fix NPE from rewriting of missing classes contexts
Bug:
Change-Id: Ib9d194d870ba79be2f8f704666100388fc8d0db7
M src/main/java/com/android/tools/r8/shaking/MissingClasses.java
ch...@google.com <ch...@google.com> #16
The fix should now be in R8 3.1.80, 3.2.71 and 3.3.63.
You can build with any R8 release version by adding the following to settings.gradle
.
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:3.2.71")
}
}
}
da...@spotify.com <da...@spotify.com> #17
Thank you! I've verified that the fix works, but unfortunately it uncovered a secondary issue, which I'll open a separate bug report for.
ap...@google.com <ap...@google.com> #18
Project: r8
Branch: main
commit 9d1c3c24d90d1aefc6aa4b71a9f0733d6ccda6fe
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:30:42 2022
Reproduce NPE from rewriting of missing classes contexts
Bug: b/236615030
Change-Id: I66df15e802f060b2c58679455eb328022f30cdb7
A src/test/java/com/android/tools/r8/missingclasses/MissingClassReferencedFromForcefullyMovedMethodTest.java
M src/test/java/com/android/tools/r8/missingclasses/MissingClassesTestBase.java
https://r8-review.googlesource.com/69256
Branch: main
commit 9d1c3c24d90d1aefc6aa4b71a9f0733d6ccda6fe
Author: Christoffer Quist Adamsen <christofferqa@google.com>
Date: Wed Jun 22 15:30:42 2022
Reproduce NPE from rewriting of missing classes contexts
Bug:
Change-Id: I66df15e802f060b2c58679455eb328022f30cdb7
A src/test/java/com/android/tools/r8/missingclasses/MissingClassReferencedFromForcefullyMovedMethodTest.java
M src/test/java/com/android/tools/r8/missingclasses/MissingClassesTestBase.java
Description
When upgrading from R8 version 3.0.78 to 3.2.60, our minification starts failing with the following stack trace. Please let us know how to provide more information, if necessary.