Skip to content
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

Add tests of serialization for all ZIO data types and make Promise serializable #1771

Merged
merged 6 commits into from Sep 22, 2019

Conversation

jakubjanecek
Copy link
Contributor

Closes issue #1739

fix: Make Promise implement Serializable

Issue zio#1739
@ghostdogpr
Copy link
Member

@jakubjanecek this test was just migrated to ZIO Test. Can you rebase on master and adapt the new tests?

@jakubjanecek
Copy link
Contributor Author

@ghostdogpr I did rebase the code and converted the tests to zio-test. I do have a problem with ZTrace test which fails very strangely. I've tested serialization of ZTraceElement and Vector[ZTraceElement] and it works fine. The problem is with List[ZTraceElement] which fails on ClassNotFoundException on its own and when I try it as part of the ZTrace test it fails on java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.List$SerializationProxy to field zio.ZTrace.executionTrace of type scala.collection.immutable.List in instance of zio.ZTrace. There is a serialization proxy pattern used in List and that seems to be the problem but I really have no idea how to solve the problem. Any help?

@ghostdogpr
Copy link
Member

@neko-kai any idea about what's going on with ZTraceElement?

@dkarlinsky
Copy link
Contributor

Adding this to sbt setting seems to resolve the ZTrace issue:

.settings( Compile / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat )

This is from sbt/sbt#89

@jakubjanecek
Copy link
Contributor Author

@dkarlinsky Thank you for your help!

@ghostdogpr This PR is now ready to be merged I think.

@ghostdogpr ghostdogpr merged commit 2680b3e into zio:master Sep 22, 2019
@LGLO
Copy link
Contributor

LGLO commented Sep 22, 2019

Well done!

@ghostdogpr
Copy link
Member

@jakubjanecek thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants