Skip to content

v0.4.69

Pre-release
Pre-release
Compare
Choose a tag to compare
@alexrp alexrp released this 15 Dec 05:11
· 591 commits to master since this release
v0.4.69
  • Improvements and refactoring to I/O APIs.
    • Fixed System.IO.TerminalReader to use a read buffer size of 4096 rather than the system page size since the size has visible effects for users.
    • Added TerminalIn and TerminalOut properties to System.VirtualTerminal, enabling direct access to the terminal even when the standard I/O handles are redirected.
    • Renamed StdIn, StdOut, and StdErr properties on System.VirtualTerminal to StandardIn, StandardOut, and StandardError respectively.
    • Renamed IsRedirected property on System.IO.TerminalReader and System.IO.TerminalWriter to IsInteractive and inverted its meaning.
    • Added IsValid property on System.IO.TerminalHandle.
    • Added System.SystemVirtualTerminal.SizePollingInterval property to control resize polling interval (defaults to TimeSpan.FromMilliseconds(100)).
    • Added Reader property on System.IO.TerminalReader and Writer property on System.IO.TerminalWriter; these provide convenient TextReader/TextWriter wrappers.
    • Added System.SystemVirtualTerminal.DangerousRestoreSettings method.
    • Removed System.Terminal.System static property in favor of System.SystemVirtualTerminal.Instance.
    • Renamed some events to follow .NET naming conventions for events.
  • Improvements to control sequence construction.
    • Added many more control sequences to System.Text.Control.ControlBuilder, System.Text.Control.ControlSequences, and System.Text.Control.ControlConstants.
    • Changed SetTitle to take ReadOnlySpan<char> instead of string.
    • Added a reallocateThreshold parameter to System.Text.Control.ControlBuilder.Clear() (defaults to 4096).
  • Various platform-specific driver improvements.
    • Fixed regression in SIGCONT handling causing terminal settings to be incorrectly overwritten by System.Native.
    • Fixed Windows console input misbehaving in some cases when Ctrl-C was pressed.
    • Fixed IsRawMode being set incorrectly when changing the mode threw an exception.
    • More thoroughly set Unix termios state and Windows console modes.
      • All known bits and modes are now set to sensible values as needed.
      • Explicitly switch to cooked mode on initialization rather than trusting the shell.
    • Use the same output lock for standard output and standard error.
    • Use the new direct terminal access properties when changing terminal settings.
    • Improved P/Invoke-related exception messages throughout driver code.
    • Make drivers behave properly when any I/O handles are invalid.
  • Added a new System.Diagnostics.TerminalProcess API.
    • This API wraps System.Diagnostics.Process and bans the use of it.
    • This new API handles terminal settings for non-redirected child processes correctly.
    • Non-redirected child processes can only be created in cooked mode.
    • Processes can be created easily with the new System.Diagnostics.TerminalProcessBuilder class.
  • Added a new System.Terminal.Hosting package.
    • Provides APIs that help ensure that terminal settings are correctly restored when your program exits.
    • You implement the new System.Hosting.IProgram interface rather than writing a classic Main entry point.
    • Backed by a source generator that generates the real Main entry point for you.
  • System.Terminal packages now add Using items based on the ImplicitUsings MSBuild property.
  • Removed TermInfo NuGet dependency as it is not currently used.