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

Cannot build a Docker image with Scala 3.3.0 and sbt-native-packager (4.0.0-RC16) #1245

Open
straszydlo opened this issue Aug 16, 2023 · 2 comments

Comments

@straszydlo
Copy link

It is not possible to create a Docker image with sbt-native-packager in a Scala 3.3.0 project that uses TypesafeConfigProvider from zio-config 4.0.0-RC16.

Minimal repo to reproduce the issue: https://github.com/straszydlo/zio-config-docker-bug

It is possible to compile and run the project, but when running sbt docker:publishLocal a following error is displayed:

[error] -- Error: typesafe/shared/src/main/scala/zio/config/typesafe/TypesafeConfigProvider.scala:13:0 
[error] undefined: new com.github.ghik.silencer.silent # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class ghik)),object silencer),silent),<init>) at readTasty
[error] one error found
[error] (Compile / doc) DottyDoc Compilation Failed

This is due to the fact that TypesafeConfigProvider uses com.github.ghik.silencer.silent annotation provided by the silencer plugin that is not compatible with Scala 3.3.0.

@jxnu-liguobin
Copy link

+1 publishLocal command is not available

sbt publishLocal
[info] Wrote /Work/zio-nebula/core/target/scala-3.3.1/zio-nebula_3-0.0.5+16-cbacc39d-SNAPSHOT.pom
[info] Main Scala API documentation to /Work/zio-nebula/core/target/scala-3.3.1/api...
[error] -- Error: typesafe/shared/src/main/scala/zio/config/typesafe/TypesafeConfigProvider.scala:13:0 
[error] undefined: new com.github.ghik.silencer.silent # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class ghik)),object silencer),silent),<init>) at readTasty
[error] one error found

@mprihoda
Copy link

Been able to work around it by adding ghik library to make DottyDoc happy.

 libraryDependencies += "com.github.ghik" %% "silencer-lib" % "1.4.2" % Provided cross CrossVersion.for3Use2_13

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