-
-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Checklist
- I read the documentation at https://chimney.readthedocs.io/ and checked that the functionality exists
- I verified that the behavior for my use case doesn't match the documentation
- I checked the https://github.com/scalalandio/chimney/issues and haven't found the issue reported
- I checked the https://github.com/scala/bug/issues and haven't found the issue reported there - relevant for Scala 2 compiler crashes, since it might be a bug in the compiler
- I checked the https://github.com/lampepfl/dotty/issues and haven't found the issue reported there - relevant for Scala 3 compiler crashes, since it might be a bug in the compiler
- I confirmed that the bug is not related to functionality that was deprecated: lifted transformers (
TransformerF
s) orunsafeOption
flags - I believe that this is actual bug, rather than a question how to use existing features
Describe the bug
When transforming from Tuple10,11..N compilation fails with message like:
`Chimney can't derive transformation from scala.Tuple10[java.lang.String, java.lang.String, java.lang.String, java.lang.String, scala.Some[java.lang.String], scala.Double, java.lang.String, java.lang.String, java.lang.String, java.lang.String] to Playground.Order
Reproduction
https://scastie.scala-lang.org/VladKopanev/G7wkbDmoTPieFaoLMxfFIA/18
If posting a snippet, test it first with scala-cli run --server=false .
!
Expected behavior
I expect transformation from Tuple10 to case class to compile. The same code snipped works if version of the library is changed to chimney 1.7.3
Actual behavior
Chimney can't derive transformation from scala.Tuple10[java.lang.String, java.lang.String, java.lang.String, java.lang.String, scala.Some[java.lang.String], scala.Double, java.lang.String, java.lang.String, java.lang.String, java.lang.String] to Playground.Order
Playground.Order
totalAmount: scala.Double - can't derive transformation from totalAmount: scala.Some[java.lang.String] in source type scala.Tuple10[java.lang.String, java.lang.String, java.lang.String, java.lang.String, scala.Some[java.lang.String], scala.Double, java.lang.String, java.lang.String, java.lang.String, java.lang.String]
currency: java.lang.String - can't derive transformation from currency: scala.Double in source type scala.Tuple10[java.lang.String, java.lang.String, java.lang.String, java.lang.String, scala.Some[java.lang.String], scala.Double, java.lang.String, java.lang.String, java.lang.String, java.lang.String]
scala.Double (transforming from: _5 into: totalAmount)
derivation from tuple10._5: scala.Some[java.lang.String] to scala.Double is not supported in Chimney!
java.lang.String (transforming from: _6 into: currency)
derivation from tuple10._6: scala.Double to java.lang.String is not supported in Chimney!
Which Chimney version do you use
1.8.0 with Scala 3.6.4
Which platform do you use
- JVM
- Scala.js
- Scala Native
If you checked JVM
Which JVM distribution do you use (you can provide java -version
output).
Additional context
Add any other context about the problem here.