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

Not compatible with ZIO 2.0-RC3 #508

Closed
francisdb opened this issue Mar 21, 2022 · 5 comments
Closed

Not compatible with ZIO 2.0-RC3 #508

francisdb opened this issue Mar 21, 2022 · 5 comments
Assignees

Comments

@francisdb
Copy link

francisdb commented Mar 21, 2022

Scala 3.1.1 with -Yexplicit-nulls
zio-opentelemetry 2.0.0-RC1

when upgrading from zio 2.0.0-RC2 to 2.0.0-RC3 we have the compiler throwing

java.lang.AssertionError: assertion failed while compiling /foobar/tests/src/main/scala/tracing.scala
[error] ## Exception when compiling 1 sources to /foobar/tests/target/scala-3.1.1/classes
[error] java.lang.AssertionError: assertion failed
[error] scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
[error] dotty.tools.dotc.core.Types$MethodType.<init>(Types.scala:3697)
[error] dotty.tools.dotc.core.Types$CachedMethodType.<init>(Types.scala:3717)
[error] dotty.tools.dotc.core.Types$MethodTypeCompanion.apply(Types.scala:3788)
[error] dotty.tools.dotc.core.Types$MethodTypeCompanion.apply(Types.scala:3787)
[error] dotty.tools.dotc.core.Types$LambdaType.newLikeThis(Types.scala:3470)
[error] dotty.tools.dotc.core.Types$LambdaType.newLikeThis$(Types.scala:3403)
[error] dotty.tools.dotc.core.Types$MethodOrPoly.newLikeThis(Types.scala:3483)
...

Single file with single line

src/main/scala/tracing.scala

val y = zio.telemetry.opentelemetry.Tracing.live

build.sbt

scalaVersion := "3.1.1"

scalacOptions ++= Seq(
  "-unchecked",
  "-deprecation",
  "-feature",
  "-Yexplicit-nulls",
  "-source",
  "future"
)

libraryDependencies ++= Seq(
  "dev.zio" %% "zio"               % "2.0.0-RC3",
  "dev.zio" %% "zio-opentelemetry" % "2.0.0-RC1"
)
@adamgfraser
Copy link
Contributor

Okay, so this is a situation where a dependency is not compiled against a compatible ZIO version so I think the expectation is that this is not going to compile and I don't think we can make any guarantees regarding what the compiler error message will be. If this error message is worse when you use automatic layer construction versus manual layer construction then perhaps there is something we can do in the layer construction macro but otherwise I think you just have to wait for compatible dependencies.

@francisdb
Copy link
Author

francisdb commented Mar 21, 2022

There's a big difference between not compiling and the compiler throwing an AssertionError

@vladimir-lu vladimir-lu self-assigned this Mar 22, 2022
@vladimir-lu
Copy link
Collaborator

I already started the work for bringing an RC3 compatible version in #509 - it's waiting on the zio-http module right now

@runtologist
Copy link
Member

Thanks to the work of @vladimir-lu there is a brand new v2.0.0-RC2, which adds compatibility with ZIO 2.0.0-RC4 and all the goodness like getting rid of ZManaged and simplifying the Environment.

@francisdb
Copy link
Author

francisdb commented Apr 6, 2022

Any idea when this will be available at https://repo1.maven.org/maven2/dev/zio/zio-opentelemetry_3/ ?

It's available, big 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

No branches or pull requests

4 participants