aemoncannon/ensime — Issue #202: sbt 11, subprojects and windows gets incorrect classpath 
Author: chris-twiner
Created: 2011-11-10 21:22:14+00:00
State: open

so as per #201 (and needs it to get this far), the classpath is incorrectly parsed from Sbt10Style. Its probably to do with the jline change itself but it seems each line is prefixed by `prompt` again.

As such simply adding it in:

private val singleLineSetting: Pattern = Pattern.compile("^"+prompt+"\\[info\\] (.+)$", Pattern.MULTILINE)

works a treat. I now get full project type checking (albeit with the odd spurious presentation compiler npes ^_^).

So although ensime takes a while longer to start up, its now firing on all the proverbials - happy times.

Of course doing this will likely stop it working for unix and macx users.

Perhaps using:

private def evalNoop()(implicit shell: Spawn): Unit = {
shell.send("\r\n")
Thread.sleep(1000)
shell.expect(prompt)
mostRecentStr // scrap the last lot
shell.send("\r\n")
shell.expect(prompt)

println("Ctw evalNoop has ->>-" +mostRecentStr) // prompt+prompt is the winner
mostRecentStr
}

you could identify which type it is. If mostRecentStr == (prompt+prompt)