zio / zio-mock

https://zio.dev/zio-mock
Apache License 2.0
27 stars 33 forks source link

Migrate to ZIO 2.0.0 final #23

Closed reibitto closed 2 years ago

reibitto commented 2 years ago

I started the migration to ZIO 2.0.0 final but I ran into many roadblocks so this is still in an incomplete state. The compile errors regarding macros are beyond my ability.

@vigoo @adamgfraser Whether you want to use this as a base or throw it away, either is fine with me. Just thought I'd publish what I have so far regardless.

vigoo commented 2 years ago

Thanks for starting it!

vigoo commented 2 years ago

@reibitto I fixed the unsafes, there are still some failing tests and compilation error on Scala Native, feel free to continue as I don't have more time right now for this

reibitto commented 2 years ago

I pushed an update that should fix a bunch of the failing tests. JVM modules seem fine to me locally now. I don't know about scala-native though. Still can't get that to compile.

reibitto commented 2 years ago

Oh wait, JVM and native is good now in CI. JS is the one that has an issue. Looks like SecureRandom isn't available on Scala.js by default?

reibitto commented 2 years ago

ok, adding "org.scala-js" %%% "scalajs-java-securerandom" % "1.0.0" fixed that last error. That same dependency is in the main zio project so I assume it's fine?

Everything is green now. Might want to make sure my change in MockClock to support the currentTime overload is correct. I wasn't too sure about that. I followed one of the examples in the tests.

vigoo commented 2 years ago

Looks good to me, I'm merging and releasing it. Thank you!