mirror of https://github.com/sbt/sbt.git
Remove Terminal.withCanonicalIn
This was implemented as a no-op so we may as well get rid of it.
This commit is contained in:
parent
c291348d6a
commit
52743051eb
|
|
@ -221,8 +221,7 @@ private[sbt] object JLine {
|
|||
"Don't use jline.Terminal directly. Use Terminal.get.withCanonicalIn instead.",
|
||||
"1.4.0"
|
||||
)
|
||||
def usingTerminal[T](f: jline.Terminal => T): T =
|
||||
Terminal.get.withCanonicalIn(f(Terminal.get.toJLine))
|
||||
def usingTerminal[T](f: jline.Terminal => T): T = f(Terminal.get.toJLine)
|
||||
|
||||
@deprecated("unused", "1.4.0")
|
||||
def createReader(): ConsoleReader = createReader(None, Terminal.wrappedSystemIn)
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ trait Terminal extends AutoCloseable {
|
|||
|
||||
private[sbt] def name: String
|
||||
private[sbt] def withRawInput[T](f: => T): T = f
|
||||
private[sbt] def withCanonicalIn[T](f: => T): T = f
|
||||
private[sbt] def write(bytes: Int*): Unit
|
||||
private[sbt] def printStream: PrintStream
|
||||
private[sbt] def withPrintStream[T](f: PrintStream => T): T
|
||||
|
|
@ -381,7 +380,6 @@ object Terminal {
|
|||
t.setAttributes(attributes)
|
||||
override private[sbt] def setSize(width: Int, height: Int): Unit = t.setSize(width, height)
|
||||
override def withRawInput[T](f: => T): T = t.withRawInput(f)
|
||||
override def withCanonicalIn[T](f: => T): T = t.withCanonicalIn(f)
|
||||
override def printStream: PrintStream = t.printStream
|
||||
override def withPrintStream[T](f: PrintStream => T): T = t.withPrintStream(f)
|
||||
override private[sbt] def withRawOutput[R](f: => R): R = t.withRawOutput(f)
|
||||
|
|
|
|||
|
|
@ -62,16 +62,14 @@ object ConsoleProject {
|
|||
val initCommands = importString + extra
|
||||
|
||||
val terminal = Terminal.get
|
||||
terminal.withCanonicalIn {
|
||||
// TODO - Hook up dsl classpath correctly...
|
||||
(new Console(compiler))(
|
||||
unit.classpath,
|
||||
options,
|
||||
initCommands,
|
||||
cleanupCommands,
|
||||
terminal
|
||||
)(Some(unit.loader), bindings).get
|
||||
}
|
||||
// TODO - Hook up dsl classpath correctly...
|
||||
(new Console(compiler))(
|
||||
unit.classpath,
|
||||
options,
|
||||
initCommands,
|
||||
cleanupCommands,
|
||||
terminal
|
||||
)(Some(unit.loader), bindings).get
|
||||
()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue