ocean
ocean copied to clipboard
Truncated AppStatus output
v4.3.5 introduced a regression (well https://github.com/sociomantic-tsunami/ocean/commit/2814d46b313a3be7c96eacd470242f94d72bab3c to be precise) such that the console output of my application, provided by AppStatus (https://github.com/sociomantic-tsunami/ocean/blob/2814d46b313a3be7c96eacd470242f94d72bab3c/src/ocean/io/console/AppStatus.d), is truncated at the 80th column.
I have a workaround but I suspect the correct fix to the regression (i.e. restoring the old behaviour but completely untested) is changing the 80 to 0 here: https://github.com/sociomantic-tsunami/ocean/blob/7050fff8e3774904aa07fa75632479fbb13d59f3/src/ocean/io/console/AppStatus.d#L400
This may however break the intention of https://github.com/sociomantic-tsunami/ocean/commit/2300aa92015a86228c8f290b81941b02beec07ea
Without looking to hard I would think a correct design would be to default to querying the terminal (the behaviour you get by using 0 for terminal width). If there is no terminal (i.e. https://github.com/sociomantic-tsunami/ocean/blob/7050fff8e3774904aa07fa75632479fbb13d59f3/src/ocean/io/Terminal.d#L316 fails) then a flag is kept indicating no output should be produced until the application prods AppStatus in the future (i.e. when AppStatus is connected to a socket). At that point the App provides the desired width, or again 0 to query the Terminal again, now there presumably is one.