-
Notifications
You must be signed in to change notification settings - Fork 148
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
NullPointerException in the 0.7.7 version of zio-json-golden #1252
Comments
@agilesteel Could you please share your steps to reproduce, including environment setup (OS, JDK, etc.) 🙏 |
In 0.7.6: In 0.7.7: It seems that The change was part of this PR: #1249 |
It's a hello-world project with the example from the readme of zio-json-golden:
scalaVersion := "2.13.16"
libraryDependencies += "dev.zio" %% "zio-json-golden" % "0.7.7" src/test/scala/EncodeDecodeSpec.scala import zio.json._
import zio.json.golden._
import zio.test._
import zio.test.magnolia.DeriveGen
object EncodeDecodeSpec extends ZIOSpecDefault {
case class Banana(curvature: Double)
object Banana {
implicit val codec: JsonCodec[Banana] = DeriveJsonCodec.gen[Banana]
}
def spec = suite("EncodeDecodeSpec")(
goldenTest(DeriveGen[Banana])
)
} java -version openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing) Tested on both |
@agilesteel @erikvanoosten Thanks for your feedback! The release with a fix is already available on the Maven Central: https://github.com/zio/zio-json/releases/tag/v0.7.8 I've reverted my change that lead to NPE. I added a workaround that handles unexpected "java.lang.IllegalArgumentException: URI is not hierarchical" in unit tests with Scala 2.12.20 I committed a sample project to I will use it for manual testing until find how to automate it. |
https://github.com/zio/zio-json/blob/v0.7.7/zio-json-golden/src/main/scala/zio/json/golden/filehelpers.scala#L18 this line was changed in
0.7.7
and now it throws aNullPointerException
for the example from the readmeIt's all good in
0.7.6
but it's broken in0.7.7
.The text was updated successfully, but these errors were encountered: