-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to kotlinx.reflect.lite when it’s sufficient #307
Comments
From what I remember, no, but that was back when it was first introduced.
We should look again.
…On Mon, May 15, 2017 at 12:47 PM Louis CAD ***@***.***> wrote:
Here's a lightweight version of kotlin-reflect:
https://github.com/Kotlin/kotlinx.reflect.lite
My question is: Can it be used for Moshi to bring the library size down?
If yes, this issue is a feature request for it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#307>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEagcpXw6-O0zwYhNGINdyS74AyS1ks5r6KvUgaJpZM4NbmkG>
.
|
#269 used features not currently provided by |
Maybe you should reach to JetBrains so they include reflection features Moshi needs into |
Other options:
|
Does moshi has any plan to support annotation processing instead of reflection? |
No plans. Try auto-value-moshi.
…On Mon, Jun 12, 2017 at 3:00 AM twocity ***@***.***> wrote:
Does moshi has any plan to support annotation processing instead of
reflection?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#307 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEf57aHJjJgDVFYT5xYhflFA78frNks5sDOIfgaJpZM4NbmkG>
.
|
I opened an issue in Youtrack about the gigantic size of kotlin-reflect, not ideal for Instant Apps. I requested a split, and to use Protobuf Nano (if not done already): https://youtrack.jetbrains.com/issue/KT-20793 |
It seems Room from Android Architecture Components can use Kotlin data classes without using the 1MB large (after proguarding!!) kotlin-reflect thanks to kapt generated code. Couldn't a similar technique be used in moshi? |
I have not used it, but https://github.com/ansman/kotshi exists. As Jake said, no current plans to support an annotation processor in this project. |
I think if the features listed here were implemented, use of |
Just an update on this for posterity: We now have a code generation artifact, and kotlinx.reflect.lite hasn't been updated in two years, though there is a PR open on it to move to kotlinx-metadata and improve the API: Kotlin/kotlinx.reflect.lite#12. We can revisit this if that PR is ever merged |
I've opened a PR that resolves this in spirit via replacing kotlin-reflect with kotlinx-metadata instead #1076 |
Here's a lightweight version of kotlin-reflect: https://github.com/Kotlin/kotlinx.reflect.lite
My question is: Can it be used for Moshi to bring the library size down? If yes, this issue is a feature request for it.
The text was updated successfully, but these errors were encountered: