Closed longliveenduro closed 2 years ago
I use the following code
sealed trait PositionHint case class CellPositionHint( cellType: CellType, mnc: String, mcc: String, cid: Int, lac: Option[Int], signalStrength: Option[Int], sinr: Option[Int] ) extends PositionHint object CellPositionHint: enum CellType: case LTE, GSM, WCDMA, NBIOT, LTEM case class WlanPositionHint(mac: String) extends PositionHint case class DeviceLocation(hints: Seq[PositionHint])
and the following Tapir endpoint definition:
val positionInfoEndpoint: PublicEndpoint[DeviceLocation, Unit, GeolocationServiceResult, Any] = endpoint.post .in("position-info") .in(jsonBody[DeviceLocation]) .out(jsonBody[GeolocationServiceResult])
I get the following compiler error
error] -- Error: /home/chris/prj/toil/zio-geolocation/modules/core/src/main/scala/com/tsystems/toil/geolocation/rest/Endpoints.scala:21:34 [error] 21 | .in(jsonBody[DeviceLocation]) [error] | ^ [error] | method deriveSubtype is declared as `inline`, but was not inlined [error] | [error] | Try increasing `-Xmax-inlines` above 32 [error] |--------------------------------------------------------------------------- [error] |Inline stack trace [error] |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [error] |This location contains code that was inlined from impl.scala:136 ....
Sorry, not a ZIO-JSON bug, but a Tapir bug, see https://github.com/softwaremill/tapir/issues/2383
I use the following code
and the following Tapir endpoint definition:
I get the following compiler error