Status Update
Comments
zh...@google.com <zh...@google.com> #2
yb...@google.com <yb...@google.com> #3
yea i'm not sure why.
given that we have
The only problem i see might be that the jvm implementation throws java.IOException, that we cannot move to common. So it may not be possible to move the whole implementation to common but we should be able to declare the constructor in the expect.
It shouldn't even be an API change since in both platforms, it has the same constructor signature.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Zhiyuan Wang <
Link:
Define the default constructor for ReplaceFileCorruptionHandler which can be used in common code
Expand for full commit details
Define the default constructor for ReplaceFileCorruptionHandler which can be used in common code
Bug: b/358138957
Test: ./gradlew :datastore:datastore-core:test
Change-Id: I795b055022878928f05970fe63ae6c907ef3af14
Files:
- M
datastore/datastore-core/src/commonJvmMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.jvm.kt
- M
datastore/datastore-core/src/commonMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.kt
- M
datastore/datastore-core/src/nativeMain/kotlin/androidx/datastore/core/handlers/ReplaceFileCorruptionHandler.native.kt
Hash: 0f39d9164b42a309a9a9fdb89d8ec0f9ef4c9eb8
Date: Thu Oct 03 15:33:39 2024
zh...@google.com <zh...@google.com> #5
Code changes merged, it will be in the next release. We don't have a concrete date yet but will mention this improvement in the release notes.
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.datastore:datastore-core:1.1.2
androidx.datastore:datastore-core-android:1.1.2
androidx.datastore:datastore-core-iosarm64:1.1.2
androidx.datastore:datastore-core-iossimulatorarm64:1.1.2
androidx.datastore:datastore-core-iosx64:1.1.2
androidx.datastore:datastore-core-jvm:1.1.2
androidx.datastore:datastore-core-linuxx64:1.1.2
androidx.datastore:datastore-core-macosarm64:1.1.2
androidx.datastore:datastore-core-macosx64:1.1.2
Description
DataStore Version used: 1.1.1
It is not possible to create instance of `ReplaceFileCorruptionHandler` from common code, because it does not have default constructor. It should probably have a constructor with `produceNewData` block as the actual implementations have.