Microsoft/vscode
Vedi su GitHubExplore file watcher handling of verbose VS Code CLI commands
Open
#141.488 aperta il 25 gen 2022
debtengineeringhelp wantedmacosmacos-big-surworkbench-cli
Metriche repository
- Star
- (74.848 star)
- Metriche merge PR
- (Merge medio 11h 43m) (1000 PR mergiate in 30 g)
Descrizione
Ref https://github.com/microsoft/vscode/issues/141053
Currently:
- The CLI process on macOS (Big Sur and above) spawns the main process using the
opencommand so that VS Code is launched with the correct entitlements. - the
opencommand can only redirect stdout and stderr to files, so we currently create temp files for theopencommand, and then set up file watchers on the CLI process to detect when those files are being written to. code-insiders --statusandcode-insiders --verboseboth require the setup with the file watchers.- :bug: When the main process exits, the CLI process cancels the filewatching, but the watcher might not have finished reading through the file yet. Therefore, some of the expected output is cut off early at the end.
A mitigation is to add in a timeout so that there is a delay between the main process exiting and the filewatcher being cancelled, but there should be a better way to detect when to stop watching. Actually, the issue reminds me a bit of flush() methods in other contexts.