Skip to content

initialCommands causes console task to hang in scala-2.9.1 #192

@josharnold52

Description

@josharnold52

I think scala-2.9.1 broke something in the initialCommands functionality. It seems that any use of initialCommands causes the REPL to hang after its first prompt.

I can reproduce the issue with the following minimal build.sbt:

scalaVersion := "2.9.1"

initialCommands in console := "val testValue  = List(1,2,3)"

Here's my sbt-session

[info] Set current project to default-464d80 (in build file:/Users/arnold/projects/sbt-bug/)
> console
[info] Starting scala interpreter...
[info] 
testValue: List[Int] = List(1, 2, 3)
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :help

The console hangs at that point until I control-C out of it.

The problem goes away if I remove the initialCommands or use an earlier version of scala.

I did find a new issue logged against the interpreter that might be related, but I haven't had any luck applying the suggested workaround this context:

https://issues.scala-lang.org/browse/SI-4945

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions