Repository navigation
Replies: 1 comment
The host's stderr is not the only channel a plugin hasYour reading of There is a second channel a plugin can own, independent of the host's stdio: the cordis logger. Measured with cordis So "plugin diagnostics are invisible in a running desktop" has a plugin-side answer: a diagnostic plugin can sink these messages and write them to a file it owns, readable while the host is still running — no change to One boundary worth stating in this thread: such a sink sees what goes through the cordis logger. A plugin that writes to |
Uh oh!
There was an error while loading. Please reload this page.
Version: desktop shell bundling dsh 0.1.7 (macOS, launched via launchd); same code on
maininapps/desktop/src/host-process.ts.What happens
In
DesktopHostProcess.start()the host is spawned withstdio: ['ignore', 'pipe', 'pipe', 'ipc']. stdout is forwarded (child.stdout?.pipe(process.stdout)), but stderr is only appended to an in-memory ring buffer:That buffer is only read when the host exits (as the suffix of "dsh desktop host exited/stopped"). While the host is running, nothing written to stderr reaches the desktop process's stderr or any log file.
Impact
Plugins that report failures through
console.warn/console.error(and cordis loggers that write to stderr) are silent in a running desktop. In our case a scheduled plugin job failed repeatedly for about 5 hours and the only signal was aconsole.warnthat never appeared in the shell's log, whileconsole.loglines from the same plugin did.Expected
Runtime stderr from the host should be observable in the desktop's log, in the same way stdout already is.
Suggestion
child.stderr?.pipe(process.stderr)), keeping the existing tail buffer for exit diagnostics; orAll reactions