Skip to content

Converge the console hosts - #939

Merged
Andy Jordan (andyleejordan) merged 56 commits into
masterfrom
andschwa/consolehost
May 17, 2016
Merged

Andy Jordan (andyleejordan) merged 56 commits into
masterfrom
andschwa/consolehost

Conversation

@andyleejordan

@andyleejordan Andy Jordan (andyleejordan) commented May 3, 2016 •

Copy link
Copy Markdown
Member

This resolves #495 and #912. This is a work-in-progress, do not merge.

Next steps:

  • fully deprecate powershell-native custom host
  • ensure FullCLR build can still work
  • remove deprecated CoreConsoleHost project
  • deprecate or reimplement consoleHostFile feature
  • fix mark failing tests as pending
  • deploy modules in build script rather than as content use files like in libuv use shim project
  • merge our managed ReadLine backup use System.Console.ReadLine()
  • accept --flags
  • fix stdin/stdout/stderr stream writers
  • fix non-interactive use of BufferSize
  • fix Linux CI
  • fix OS X CI (~31 marked as pending until further notice)
  • fix Windows CI
  • fix output when there is no TTY (mostly)

How it was done:

The managed RawUserInterface from CoreConsoleHost was used to replace the Windows-centric ConsoleControl of the ConsoleHost. The work done to port PSReadLine to Linux enabled a much easier replacement of the ReadLine aspects of ConsoleHostUserInterface. While this deprecates our previous ReadLine implementation; it was required to push .NET Core to implement the APIs necessary to port PSReadLine. The managed entrance Start function is replaced with a Main function for the dotnet native host to build an app.


This change is Reviewable

@andyleejordan Andy Jordan (andyleejordan) added the Usability (LEGACY) Helps filter issues that might be higher priority because they directly affect usability label May 4, 2016
@andyleejordan
Andy Jordan (andyleejordan) force-pushed the andschwa/consolehost branch 2 times, most recently from 2f21682 to 8c960f3 Compare May 5, 2016 21:31
@andyleejordan
Andy Jordan (andyleejordan) force-pushed the andschwa/consolehost branch 2 times, most recently from e4bfc7e to a8ae949 Compare May 6, 2016 21:46
@andyleejordan
Andy Jordan (andyleejordan) force-pushed the andschwa/consolehost branch 8 times, most recently from b1f3477 to 203cb21 Compare May 11, 2016 21:23
@andyleejordan Andy Jordan (andyleejordan) added this to the v0.4.0 milestone May 11, 2016
@andyleejordan
Andy Jordan (andyleejordan) force-pushed the andschwa/consolehost branch 4 times, most recently from 17650d9 to 6559c8d Compare May 11, 2016 22:59
@andyleejordan

Copy link
Copy Markdown
Member Author

This is seriously annoying. These pass locally on both Windows and Linux... but I'm having problems getting them to run correctly in AppVeyor's environment where there are no Console handles.

@andyleejordan

Copy link
Copy Markdown
Member Author

The non-pending Linux, OS X, and Windows tests all pass locally.

@andyleejordan

Copy link
Copy Markdown
Member Author

I've narrowed down the OS X test failures to be caused by the lack of a TTY on the OS X test runner (which is strange, considering that the Linux runner has a TTY, and Travis already tracked and fixed a bug where OS X did not have a TTY allocated; thus I believe it to be a regression).

@andyleejordan

Copy link
Copy Markdown
Member Author

For reference, previous Travis bug is travis-ci/travis-ci/issues/2872. Nonetheless, I think that ConsoleHost should work properly without a TTY.

Andy Jordan (andyleejordan) and others added 21 commits May 17, 2016 13:28
Instead of hard-coded paths.
Not supported with non-PSReadLine Open PowerShell host.
This code is all used for reading secure strings, which we don't yet
support.
While this passes on Linux, it does not pass on Windows, indicating a
platform-specific bug in .NET Core.
These pass locally, just not with AppVeyor's host.
`Start-PSBootstrap` takes care of this.
These tests *do not* fail locally, nor on the Linux test runner. They do
not fail when accessing the OS X runner under debug mode. The *only*
cause is the lack of a TTY on the OS X runner, which is a Travis CI
regression. Moreover, the formatting tests do not fail when the TTY is
removed locally.

These absolutely should be fixed at some point, but it is not worth
spending any more time on it.
Makes more sense.
@andyleejordan
Andy Jordan (andyleejordan) force-pushed the andschwa/consolehost branch 2 times, most recently from bc8f6eb to 2df16d0 Compare May 17, 2016 20:35
Revert change made within the function since the function itself is
compiled out for the portable version of PowerShell.
@lzybkr

Jason Shirk (lzybkr) commented May 17, 2016 •

Copy link
Copy Markdown
Contributor

LGTM

@andyleejordan
Andy Jordan (andyleejordan) deleted the andschwa/consolehost branch May 17, 2016 21:44
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Usability (LEGACY) Helps filter issues that might be higher priority because they directly affect usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port features from ConsoleHost to Cross-Platform Host

3 participants