* Fixes [sbt/sbt#2781]
* When using `<TAB>` completion the failed errors were always
computed for mathcing projects even if there was no failure,
leading to excessive computation of Levenshtein distances
and a large lag (seconds) on builds with many matching
projects.
sbt's shell provided completion only for keys that were relative to a
defined project, but didn't provide completion for keys that belong to
the build definition only.
This commit fixes this issue by defining a new kind of `Parser` (from
which completions are generated) which runs its input simultaneously on
distinct parsers. We now define a parser for project-level keys and
another parser for build-level keys. These two parsers are eventually
combined, and we get the completions of both parsers.
Fixessbt/sbt#2460
Thread sleeping interferes with scripted test when the build cannot be
loaded. The scripted test gets stuck, and jstack shows
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sbt.internal.util.InputStreamWrapper.read(LineReader.scala:138)
at
jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:2
45)
....
at sbt.internal.util.JLine$.withJLine(LineReader.scala:118)
at sbt.internal.util.JLine.readLine(LineReader.scala:18)
at
sbt.BuiltinCommands$.sbt$BuiltinCommands$$doLoadFailed(Main.scala:460)