You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ scala-cli version
Scala CLI version: 1.0.4
Scala version (default): 3.3.0
$ javac -version
javac 17.0.8
Describe the bug
Scala CLI crashes when there is only .java-source but if a .scala-file is added then it works fine. If the .scala-file is removed then it crashes again.
java.lang.RuntimeException: Expected Scala artifacts to be fetched
See stack trace below.
To Reproduce
$ mkdir scala-cli-issue && cd scala-cli-issue
$ cat >Test.java
public class Test {
public void hello() {
System.out.println("Hello!");
}
}
$ scala-cli repl .
Compiling project (Java)
Compiled project (Java)
Error: java.lang.RuntimeException: Expected Scala artifacts to be fetched
For more details, please see '/home/bjornr/tmp/scala-cli-issue/.scala-build/stacktraces/1695833159-3995895079627923036.log'
$ cat .scala-build/stacktraces/1695833159-3995895079627923036.log
java.lang.RuntimeException: Expected Scala artifacts to be fetched
scala.sys.package$.error(package.scala:27)
scala.cli.commands.repl.Repl$.$anonfun$16(Repl.scala:288)
scala.Option.getOrElse(Option.scala:201)
scala.cli.commands.repl.Repl$.runRepl$$anonfun$1(Repl.scala:289)
scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
scala.build.EitherCps$Helper.apply(EitherCps.scala:19)
scala.cli.commands.repl.Repl$.runRepl(Repl.scala:453)
scala.cli.commands.repl.Repl$.doRunRepl$1(Repl.scala:149)
scala.cli.commands.repl.Repl$.doRunReplFromBuild$1(Repl.scala:170)
scala.cli.commands.repl.Repl$.runCommand(Repl.scala:251)
scala.cli.commands.repl.Repl$.runCommand(Repl.scala:104)
scala.cli.commands.ScalaCommand.run(ScalaCommand.scala:364)
scala.cli.commands.ScalaCommand.run(ScalaCommand.scala:348)
caseapp.core.app.CaseApp.main(CaseApp.scala:150)
scala.cli.commands.ScalaCommand.main(ScalaCommand.scala:333)
caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:120)
scala.cli.ScalaCliCommands.main(ScalaCliCommands.scala:125)
scala.cli.ScalaCli$.main0(ScalaCli.scala:245)
scala.cli.ScalaCli$.main(ScalaCli.scala:108)
scala.cli.ScalaCli.main(ScalaCli.scala)
$ cat > test.scala
val x = 42
$ scala-cli repl .
Compiling project (Scala 3.3.0, JVM)
Compiled project (Scala 3.3.0, JVM)
Welcome to Scala 3.3.0 (17.0.8, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> x
val res0: Int = 42
scala> Test()
val res1: Test = Test@3d53e876
scala> res1.hello
Hello!
scala> :q
$ rm test.scala
$ scala-cli repl .
Compiling project (Java)
Compiled project (Java)
Error: java.lang.RuntimeException: Expected Scala artifacts to be fetched
For more details, please see '/home/bjornr/tmp/scala-cli-issue/.scala-build/stacktraces/1695833311-1908336239886349367.log'
Expected behaviour
Scala CLI should just work even if only .java in current dir.
The text was updated successfully, but these errors were encountered:
Version(s)
Describe the bug
Scala CLI crashes when there is only .java-source but if a .scala-file is added then it works fine. If the .scala-file is removed then it crashes again.
See stack trace below.
To Reproduce
Expected behaviour
Scala CLI should just work even if only .java in current dir.
The text was updated successfully, but these errors were encountered: