fix(vscode): stderr logs not written to output#926
Conversation
Summary of ChangesHello @claneo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the robustness of the VSCode extension by ensuring that all test output, including Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a mergeStderrToStdout option to redirect stderr to stdout, which is particularly useful for VSCode integration. It also fixes a bug where single test cases were skipped due to an incorrect delimiter in the test name pattern. The changes are well-implemented and include corresponding tests to verify both the new feature and the bug fix. I've left one comment regarding code duplication in the new test suite, suggesting a refactoring to improve maintainability.
There was a problem hiding this comment.
Pull request overview
This PR fixes missing stderr output in the VS Code Test Runner output (by allowing stderr to be merged into stdout for VS Code’s single-stream appendOutput), and restores the ability to run a single test case by correcting the test-name delimiter used when building testNamePattern.
Changes:
- Add
mergeStderrToStdoutsupport to the core windowed renderer and enable it in the VS Code worker logger. - Fix single-test execution by switching the delimiter in
testNamePatternconstruction from double-space to single-space. - Extend VS Code integration tests/fixtures to validate stderr forwarding and single-test execution.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode/src/worker/reporter.ts | Enables stderr→stdout merging for VS Code’s logger. |
| packages/core/src/reporter/windowedRenderer.ts | Adds mergeStderrToStdout option and routes intercepted process.stderr accordingly. |
| packages/vscode/src/master.ts | Fixes testNamePattern delimiter to correctly match full test names. |
| packages/vscode/tests/suite/progress.test.ts | Adds regression tests for stderr capture and running a single test case. |
| packages/vscode/tests/fixtures/workspace-1/test/progress.test.ts | Emits stdout/stderr to validate forwarding behavior. |
| packages/vscode/tests/fixtures/fixtures.code-workspace | Workspace fixture formatting update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
👍 |
Summary
Added the
mergeStderrToStdoutoption to merge stderr output into stdout, addressing the limitation that VSCode’sappendOutputsupports only a single output stream.This also fixes the issue where running a single test was being skipped, caused by #916, which changed the delimiter from two spaces to one space.
Related Links
Checklist