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

bin-compat issue in v1.5.0? #744

Closed
jivanic-demystdata opened this issue Sep 19, 2024 · 2 comments
Closed

bin-compat issue in v1.5.0? #744

jivanic-demystdata opened this issue Sep 19, 2024 · 2 comments

Comments

@jivanic-demystdata
Copy link

jivanic-demystdata commented Sep 19, 2024

We have errors like this in the CI of the PR updating zio-schema (probably a bin-compat issue with the version used in zio-http v3.0.1)

 Exception in thread "zio-fiber-4971" java.lang.NoClassDefFoundError: Could not initialize class com.company.v2.api.MyApis$
        at com.company.v2.api..MySpec$.$anonfun$14$$anonfun$3(MySpec.scala:143)
        at com.company.v2.api..MySpec.spec(MySpec.scala:141)
        at com.company.v2.api..MySpec.spec(MySpec.scala:133)
        at com.company.v2.api..MySpec.spec(MySpec.scala:155)
        Suppressed: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'zio.schema.codec.JsonCodec$Config zio.schema.codec.JsonCodec$Config$.apply(boolean)' [in thread "ZScheduler-Worker-0"]
            at zio.http.codec.HttpContentCodec$json$.$anonfun$1(HttpContentCodec.scala:287)
            at zio.http.codec.BinaryCodecWithSchema.codec$$anonfun$1(BinaryCodecWithSchema.scala:15)
            at scala.collection.immutable.Map$EmptyMap$.getOrElse(Map.scala:246)
            at zio.http.codec.BinaryCodecWithSchema.codec(BinaryCodecWithSchema.scala:18)
            at zio.http.codec.HttpContentCodec.$init$$$anonfun$3(HttpContentCodec.scala:135)
            at scala.Option.map(Option.scala:242)
            at zio.http.codec.HttpContentCodec.$init$(HttpContentCodec.scala:135)
            at zio.http.codec.HttpContentCodec$Choices.<init>(HttpContentCodec.scala:150)
            at zio.http.codec.HttpContentCodec$Choices$.apply(HttpContentCodec.scala:150)
            at zio.http.codec.HttpContentCodec$json$.only(HttpContentCodec.scala:289)
            at zio.http.codec.HttpContentCodec$.fromSchema(HttpContentCodec.scala:268)
            at zio.http.codec.HttpCodec$.error(HttpCodec.scala:336)
            at com.company.v2.api.MyEndpoints$.<clinit>(MyEndpoints.scala:45)
            at com.company.v2.api.MyApis$.<clinit>(MyApis.scala:31)
            at com.company.v2.api..MyApis$.$anonfun$2$$anonfun$3(MyApis.scala:66)

The MyEndpoints object contains our zio-http endpoints definitions
The MyApis object contains the implementation of these endpoints

Cc @guizmaii

@987Nabil
Copy link
Contributor

Yes, the config has a new field. We should enable mima and use the unroll lib for the config.

@plokhotnyuk
Copy link
Contributor

MiMa checks were added after v1.5.0:
41a95b5

Closing it on behalf of @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

3 participants