Status Update
Comments
vi...@google.com <vi...@google.com> #2
Then one can write a type converter producer similar to view models .
ma...@gmail.com <ma...@gmail.com> #3
ma...@gmail.com <ma...@gmail.com> #4
Has any progress been made on this issue? It's really frustrating to not be able to inject my own dependencies into type converter classes.
vs...@google.com <vs...@google.com>
aa...@google.com <aa...@google.com> #5
Unfortunately no :( Any we ahve very resource constraint right now to prioritize it. If you would like to help, i'm happy to help you through the aosp setup.
aa...@google.com <aa...@google.com> #6
I would like to implement this. I already started analysis and will come back with a rough design idea in a couple of days.
ad...@google.com <ad...@google.com> #7
After spending some time on analysis I created a design doc with API proposal. I described how an implementation could work as well. I've probably missed some cases so please take a look and comment.
aa...@google.com <aa...@google.com> #8
Branch: androidx-master-dev
commit 7bd7c652fdb061d643b80f09ed3a2f1da8b12e23
Author: mzgreen <yairobbe@gmail.com>
Date: Sat Sep 19 06:02:23 2020
[GH] Add Provided Type Converter feature
This change introduces a new `@ProvidedTypeConverter` annotation that gives developers control over type converter instantiation so they can use external dependencies inside type converters. A type converter class annotated with `@ProvidedTypeConverter` won't be instantiated by Room. Room will expect such converters to be passed at runtime using new `builder.addTypeConverter()` method.
Design doc:
Test: Added `ProvidedTypeConverterTest`
Fixes:
RelNote: Room can have provided type converter annotation which allow developers to take control over type converters instantiation
This is an imported pull request from
Resolves #75
Github-Pr-Head-Sha: 7977774c1e06737ef3de88b6a57f54cda1196030
GitOrigin-RevId: c9a9d960cf95ac6cb329d8509b11d992cc034350
Change-Id: Ie4fa505b36f8aa3c98091f60af9cbbdb10ca3f33
M room/common/api/current.txt
M room/common/api/public_plus_experimental_current.txt
M room/common/api/restricted_current.txt
A room/common/src/main/java/androidx/room/ProvidedTypeConverter.java
M room/compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/ClassWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/compiler/src/test/data/daoWriter/output/ComplexDao.java
M room/compiler/src/test/data/daoWriter/output/DeletionDao.java
M room/compiler/src/test/data/daoWriter/output/UpdateDao.java
M room/compiler/src/test/data/daoWriter/output/WriterDao.java
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ProvidedTypeConverterTest.java
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/DatabaseConfiguration.java
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
ad...@google.com <ad...@google.com> #9
ad...@google.com <ad...@google.com> #10
@amy, do you think this is worth documenting somewhere?
am...@google.com <am...@google.com> #11
Yes, I can document this on the logcat and known issues pages. Will am to send a CL by the end of next week. Thanks for looping me in!
yi...@googlemail.com <yi...@googlemail.com> #12
This issue is also in Electric Eel, please change that for mac. It is stopping me from coding annotation such as compose code, very annoying. If not, make the short cut deactivable.
Please see
yi...@googlemail.com <yi...@googlemail.com> #13
Is there a work round? Any hints are really appreciated.
yi...@googlemail.com <yi...@googlemail.com> #14
The workaround works for me now, thanks to #4
I made a detailed description to remove the keymap for "alt" + "L" on mac at
Description
In Text Editor it is not possible to type an @ with the default shortcut