Compilation error during cross builds
See original GitHub issueI have the following class hierarchy:
import com.github.plokhotnyuk.jsoniter_scala.macros._
import com.github.plokhotnyuk.jsoniter_scala.core._
final case class Container(a: Option[Int], b: Option[String], src: Source)
object Container {
implicit val codec: JsonValueCodec[Container] =
JsonCodecMaker.make(CodecMakerConfig.withDiscriminatorFieldName(None))
}
sealed trait Source
object Source {
case object A extends Source
case object B extends Source
case object C extends Source
}
While it seems to pass tests and work for single scala version, trying to do the cross-version publish (or any other cross-version task) fails with:
Cannot evaluate a parameter of the 'make' macro call for type
I know this is a known type of error, but what would be the recommended way to overcome this issue?
Please find a minimal failing example here. Running a simple +publishLocal
should fail with the described error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Compiling errors while trying to link libraries in cross compilation
SOLVED -- Explanation at the end of the post. I'm working on a project and right now I have to cross-compile two packages...
Read more >error in compiling - HDF5 - HDF Forum
Hi, an error occurs when I am compling HdF5-1.10.8 My system is: Linux version 4.18.0-80.el8.x86_64 (mockbuild@kbuilder.bsys.centos.org) ...
Read more >Cross-compiling tools package guidelines - ArchWiki
What to do if compilation fails without clear message? For error, occurred during running configure , read $srcdir/pkgname-build/config.log .
Read more >Arm-Linux Cross compile error - help - Rust Users Forum
Hello. I have a problem with cross compile for arm-linux (Beaglebone black). Build command: PKG_CONFIG_ALLOW_CROSS=1 cargo build --color=always ...
Read more >How to cross-compile Go 1.19 compiler for Solaris 11 on Linux
The reason I want to do this is to build a Go 1.19 compiler for Solaris, since there are no prebuilt Go 1.19...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yet another workaround that could help for other configurations of derivation is adding intermediate
+compile
:Reopening because the source of the problem (using of
Eval.eval
for passing of parameters to themake
macro that can be used in the compile-time) is not fixed yet.The full list of
Eval.eval
calls used in the jsoniter-scala library are listed here: https://github.com/scalacenter/scala-3-migration-guide/pull/11