-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Rework compile time error message for scala 3 #145
Conversation
build.sc
Outdated
@@ -33,7 +33,7 @@ import de.tobiasroeser.mill.vcs.version.VcsVersion | |||
|
|||
val scala213 = "2.13.10" | |||
val scala212 = "2.12.17" | |||
val scala3 = "3.2.2" | |||
val scala3 = "3.3.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this update is exactly needed.
I ran into a seemingly unrelated error:
[error] error while loading TimeUnit,
[error] class file /modules/java.base/java/util/concurrent/TimeUnit.class is broken, reading aborted with class java.lang.RuntimeException
[error] bad constant pool index: 0 at pos: 3355
which is likely due to me building on a machine with JDK >= 21.
In any case, I think we can bump this since Scala 3.3.x is an LTS anyway.
8ea6f76
to
21cd0b0
Compare
21cd0b0
to
bdffffe
Compare
This includes more information in the error message that is generated when a route declaration has an invalid return type.
bdffffe
to
9cdacc8
Compare
initialize() | ||
} | ||
""").msg ==> | ||
"error in route definition `def hello` (at tasty-reflect:4:15): the method's return type scala.Tuple2[scala.Int, scala.Int] cannot be converted to the expected response type cask.model.Response[cask.model.Response.Data]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the position "tasty-reflect:4:15" is synthetic in this test. I manually verified that the error position is correct on an actual cask project.
This includes more information in the error message that is generated when a route declaration has an invalid return type.
It notably also includes the source position, as discussed in #141.