adrielcafe/voyager

Problem with @Transient during Screen serialization

ivanovpv opened this issue · 0 comments

In previous versions (before 1.1.0-beta02) - at least in 1.0.0 properties in Screen marked as @kotlinx.serialization.Transient were ignored during screen serialization. But now it throws exception claiming:

                 Caused by: java.io.NotSerializableException: <blah-blah.MyProperty>
                 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
                 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604)
                 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565)
                 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488)
                 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234)
                 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
                 	at android.os.Parcel.writeSerializable(Parcel.java:2108)
                 	at android.os.Parcel.writeValue(Parcel.java:1883) 
                 	at android.os.Parcel.writeList(Parcel.java:1092) 
                 	at android.os.Parcel.writeValue(Parcel.java:1832) 
                 	at android.os.Parcel.writeList(Parcel.java:1092) 
                 	at android.os.Parcel.writeValue(Parcel.java:1832) 
                 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:975) 
                 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1620) 
                 	at android.os.Bundle.writeToParcel(Bundle.java:1303) 
                 	at android.os.Parcel.writeBundle(Parcel.java:1044) 
                 	at android.os.Parcel.writeValue(Parcel.java:1801) 
                 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:975) 
                 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1620) 
                 	at android.os.Bundle.writeToParcel(Bundle.java:1303) 
                 	at android.os.Parcel.writeBundle(Parcel.java:1044) 
                 	at android.os.Parcel.writeValue(Parcel.java:1801) 
                 	at android.os.Parcel.writeArrayMapInternal(Parcel.java:975) 
                 	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1620) 
                 	at android.os.Bundle.writeToParcel(Bundle.java:1303) 
                 	at android.app.IActivityTaskManager$Stub$Proxy.activityStopped(IActivityTaskManager.java:4389) 
                 	at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:145) 
                 	at android.os.Handler.handleCallback(Handler.java:938) 
                 	at android.os.Handler.dispatchMessage(Handler.java:99) 
                 	at android.os.Looper.loop(Looper.java:223) 
                 	at android.app.ActivityThread.main(ActivityThread.java:7656) 
                 	at java.lang.reflect.Method.invoke(Native Method) 
                 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
                 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 

Though marking property as @kotlin.jvm.Transient helps and workable.

I don't know whether it's feature or bug?