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

ZPure#runAll sometimes returns a wrong type (E instead of Cause[E]) at runtime. #1461

Closed
yoohaemin opened this issue Jan 22, 2025 · 4 comments

Comments

@yoohaemin
Copy link

yoohaemin commented Jan 22, 2025

Exception in thread "zio-fiber-49867414" java.lang.ClassCastException: class my.app.Error cannot be cast to class zio.prelude.ParSeq (my.app.Error and zio.prelude.ParSeq are in unnamed module of loader 'app')

I just upcasted the return type (Left side of Either) into AnyRef and guarded against both kinds of returns at runtime, but this is rather surprising behavior. Probably there's a mistake somewhere, and forgot to wrap the returned E in ParSeq, but instead simply casts it.

We are on 1.0.0-RC36

@ghostdogpr
Copy link
Member

Do you have any dependency relying on an old zio-prelude? ZPure no longer uses ParSeq for errors, I removed it in #1432

@yoohaemin
Copy link
Author

Let me refresh my build. Thanks for the help!

@yoohaemin
Copy link
Author

It's zio-schema. Phew, I'm glad I didn't deploy to production.

https://mvnrepository.com/artifact/dev.zio/zio-schema_3/1.5.0

Thanks for the help.

@ghostdogpr
Copy link
Member

We really need 1.0.0 with binary compat 😢 @sideeffffect @kyri-petrou @guizmaii

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

No branches or pull requests

2 participants