You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cmake.buildTask build failures not aborting debug launches (#4785)
* Initial plan
* Fix build diagnostics and exit code not propagating when using cmake.buildTask (#4489)
When cmake.buildTask is true, the CustomBuildTaskTerminal captures build
output but never forwards it to the CMakeBuildConsumer for diagnostic
parsing. This means compiler errors never appear in the Problems tab.
Additionally, setBuildProcessForTask always resolved with exit code 0
regardless of the actual build result, causing failed builds to appear
successful (related to #3389).
Changes:
- Forward build output from CustomBuildTaskTerminal to an external
OutputConsumer so diagnostics are parsed during task builds
- Pass the consumer through resolveInternalTask to the terminal
- Use onDidEndTaskProcess instead of onDidEndTask to capture the
actual exit code from the build task
Co-authored-by: Omotola <[email protected]>
* Revert #4489 changes, keep only #3389 fix (build task exit code propagation)
Co-authored-by: Omotola <[email protected]>
* Fix stale target path on build failure by using direct exit code promise from CustomBuildTaskTerminal (#3389)
Co-authored-by: Omotola <[email protected]>
* Dispose onDidClose listener after resolving exit code
Co-authored-by: Omotola <[email protected]>
* Merge main into copilot/fix-build-task-error-reporting, resolve CHANGELOG conflict
Co-authored-by: Omotola <[email protected]>
* Fix brace-style lint error in cmakeTaskProvider.ts
Co-authored-by: Omotola <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Omotola <[email protected]>
Co-authored-by: Omotola <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ Improvements:
27
27
- Honor `debugger.workingDirectory` from the CMake File API when debugging a target, so that the `DEBUGGER_WORKING_DIRECTORY` target property is used as the debugger working directory. [#4595](https://github.com/microsoft/vscode-cmake-tools/issues/4595)
28
28
29
29
Bug Fixes:
30
+
- Fix `cmake.buildTask` build failures not aborting debug launches. When `${command:cmake.launchTargetPath}` is used in `launch.json`, a failed build now correctly prevents the stale executable from being launched. [#3389](https://github.com/microsoft/vscode-cmake-tools/issues/3389)
30
31
- Fix `cmake.compileFile` command truncating long compile commands at ~1024 characters on macOS. The command is now sent to the terminal in chunks to avoid VS Code terminal buffer limitations. [#4470](https://github.com/microsoft/vscode-cmake-tools/issues/4470)
31
32
- Fix configure/build sometimes using stale preset values when unsaved changes to included preset files are auto-saved before configure. The extension now explicitly refreshes presets from disk after saving, instead of relying solely on the asynchronous file watcher. [#4502](https://github.com/microsoft/vscode-cmake-tools/issues/4502)
32
33
- Reduce overly verbose logging when CMake configure or build fails. The Output panel no longer floods with duplicated output, and the channel is only revealed on error rather than unconditionally. [#4749](https://github.com/microsoft/vscode-cmake-tools/issues/4749)
0 commit comments