sbt/project
Ethan Atkins bb8b9a1c99 Fix switching between raw and canonical input
There were a number of issues with swithcing between raw and canonical
issues that affected both the server and the thin client. These were
reported in #5863 and #5856. In both cases, there were issues with
reading input or having the input be displayed. Debugging those issues
revealed a number of issues with how we were using the jline 3 system
terminal and the hybrid interaction with the jline 2 terminal. This
commit eliminates all of our internal jline 2 usage. The only remaining
jline 2 usage is that we create and override the global terminal for the
scala console for scala versions < 2.13. By moving away from jline 2, I
was also able to fix #5828, which reported that the home, end and delete
keys were not working.

One of the big issues that this commit addresses is that the
NetworkClient was always performing blocking reads on System.in. This
was problematic because it turns out that you can't switch between raw
and canonical modes when there is a read present. To fix this, the
server now sends a message to the client when it wants to read bytes and
only then does the client create a background thread to read a single
byte.

I also figured out how to set the terminal type properly for the thin
client on windows where we had been manually setting the capabilities to
ansi, which only worked for some keys. This fix required switching to
the WindowsInputStream that I introduced in a prior commit. Before we
were using the jline 2 wrapped input stream which was converting some
system events, like home and end, to the wrong escape sequence mappings.

The remainder of the commit is mostly just converting from jline 2 apis
to jline 3 apis.

I verified that tab completions, the scala console, the ammonite console
and a run task that read from System.in all work with both the server
and the thin client on mac, linux and windows after these changes.

Fixes #5828, #5863, #5856
2020-09-21 13:42:03 -07:00
..
ContrabandConfig.scala Adjust to upstream changes 2017-07-16 00:51:49 -04:00
Dependencies.scala Fix switching between raw and canonical input 2020-09-21 13:42:03 -07:00
Docs.scala Cleanup project/Transform.scala 2019-11-28 21:25:49 +00:00
HouseRulesPlugin.scala in-source sbt-houserules 2019-10-20 00:41:53 -04:00
NightlyPlugin.scala Remove lint warnings in sbt build 2020-07-27 09:37:53 -07:00
PublishBinPlugin.scala Make publishLocalBin work without prior publishLocal 2020-01-18 16:11:37 -08:00
Release.scala Run scalafmtSbt 2019-11-30 14:57:57 -08:00
SbtLauncherPlugin.scala Run scalafmtSbt 2019-11-30 14:57:57 -08:00
Scripted.scala Use Array to talk to proper build 2020-03-18 16:28:51 -04:00
StatusPlugin.scala Run scalafmtSbt 2019-11-30 14:57:57 -08:00
Transform.scala Run scalafmtSbt 2019-11-30 14:57:57 -08:00
Util.scala CompileOrder must be Mixed 2020-08-16 04:43:29 -04:00
build.properties Bump sbt version 2020-09-07 09:49:43 -07:00
flamegraph_svg.png document profiling tools 2018-04-04 01:29:56 -04:00
plugins.sbt Contraband 0.5.0 2020-08-15 13:20:46 -04:00