goblinfactory / konsole

Home of the simple console library consisting of ProgressBar, Window, Form, Draw & MockConsole (C# console progress bar with support for single or multithreaded progress updates) Window is a 100%-ish console compatible window, supporting all normal console writing to a windowed section of the screen, supporting scrolling and clipping of console output.
721 stars 62 forks source link

Support build server pipelines (add feature to pause output & flush) #22

Closed goblinfactory closed 4 years ago

goblinfactory commented 5 years ago

Support build server pipelines (add feature to pause output & flush)

This is specifically so that Konsole can be used on build servers ; e.g. AzureDevOps pipeline stage. It's not possible to use printat or scroll (not a full list) when redirecting output.

Trying to set cursorVisible when in an AzureDevops build script, will thrown an IO ? Exception.

What I'd like to see is the ability to detect running on a build server or that these permissions are not available and then either manually or automatically fall back to either writing to a hidden buffer and flushing the result of the buffer to output on demand, or automatically when finished scope. e.g. in a using.

Alternatively create some build server friendly versions of progressbar and other ways of reporting on some long running task when you can't change cursor position.

goblinfactory commented 4 years ago

Pause and flush is currently being built. To make this more "pipeline" friendly, it may be possible by spawning a new console to render non build log status to those processes and (or) flush the final "rendered" out put as lines to the standard out, replacing linechars with - and + and | ?

goblinfactory commented 4 years ago

Available now in version 5> use highspeed writer and if necessary create a small window, and when you're done writing to it, flush the result of the screen line by line to standard out. This is 100% compatible with all build pipelines.