Skip to content

Compilation error during cross builds #564

@mijicd

Description

@mijicd

I 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions