scala-cli
scala-cli copied to clipboard
Stackoverflow if the using dep directive is incorrect
Version(s)
1.1.0
Describe the bug
If the using dep is not a valid one, in some cases, the scala-cli throws Stackoverflow error.
To Reproduce
//> using scala 3
//> using dep "com.lihaoyi" :: "fastparse" : "3.0.2"
//import fastparse.*
object MyApp extends App {
println("Yayyy...")
}
Expected behaviour It should show compilation error that the dependency directive is not correct. However, it just fails with Stackoverflow error. Please note that if there is no space between groupId and artifactId, it shows compilation error as expected.
//> using dep "com.lihaoyi"::"fastparse":"3.0.2"
Even this also throws StackOverflow error:
//> using dep com.lihaoyi :: fastparse : 3.0.2
I wonder if https://github.com/VirtusLab/using_directives/pull/58 could help here 🤔
(Although it might just go into an infinite loop)