-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Failure to parse array annotation argument from Scala 2 dependency #14223
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
Comments
The compiler trips up while unpickling the following annotation: https://github.com/nrinaudo/kantan.codecs/blob/08ccfc69c9982d3b59800b7c575c4adf00c12831/core/shared/src/main/scala/kantan/codecs/Encoder.scala#L41 |
When an annotation argument is an Array, we can't know the element type of the Array until we've applied the argument to the annotation constructor, so we need to unpickle annotation arguments as untyped trees and rely on resolveConstructor to type them. This is the same logic we already use when unpickling Java classfiles since 610450f. Fixes scala#14223.
@smarter 🏆 |
When an annotation argument is an Array, we can't know the element type of the Array until we've applied the argument to the annotation constructor, so we need to unpickle annotation arguments as untyped trees and rely on resolveConstructor to type them. This is the same logic we already use when unpickling Java classfiles since 610450f. Fixes scala#14223.
When an annotation argument is an Array, we can't know the element type of the Array until we've applied the argument to the annotation constructor, so we need to unpickle annotation arguments as untyped trees and rely on resolveConstructor to type them. This is the same logic we already use when unpickling Java classfiles since 610450f. Fixes scala#14223.
When an annotation argument is an Array, we can't know the element type of the Array until we've applied the argument to the annotation constructor, so we need to unpickle annotation arguments as untyped trees and rely on resolveConstructor to type them. This is the same logic we already use when unpickling Java classfiles since 610450f. Fixes scala#14223.
Uh oh!
There was an error while loading. Please reload this page.
I am using a scala 2.13 library Kantan ("com.nrinaudo" % "kantan.csv-commons" % "0.6.2" cross CrossVersion.for3Use2_13) in scala 3.1.0 of cross version.
When I try to provide a implicit instance the compiler crashes. (Using given has the same result.)
Did I do something wrong ? Or Any Idea? I think the library may have used some scala 2 macro so it won't compile in scala 3. If that is true , it will be better if we has more specific compile error output.
I found this may help : scalacenter/bloop#1272
Compiler version
scalaVersion: 3.1.0
sbt: 1.6.1
Minimized code
full demo: https://github.com/14sxlin/compileerror
In build.sbt
In Main.scala
Output
There is no useful info in compile output.
The text was updated successfully, but these errors were encountered: