Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Bug Fixes:
- Fix Windows backslash handling in token splitting to preserve trailing backslashes before whitespace. This caused "Compile Active File" with MSVC + Ninja Multi-Config to merge adjacent flags (e.g., `/Fd<dir>\ /FS`) into a single malformed argument. [#4902](https://github.com/microsoft/vscode-cmake-tools/issues/4902)
- Fix kit detection returning "unknown vendor" when using clang-cl compiler. [#4638](https://github.com/microsoft/vscode-cmake-tools/issues/4638)
- Update testing framework to fix bugs when running tests of CMake Tools without a reliable internet connection. [#4891](https://github.com/microsoft/vscode-cmake-tools/pull/4891) [@cwalther](https://github.com/cwalther)
- Fix GNU LD diagnostic regex incorrectly matching CMake status lines (e.g., Zephyr build output) as linker errors in the Problems panel. [#4910](https://github.com/microsoft/vscode-cmake-tools/issues/4910)
- Fix “Make it easier for a new developer of CMake Tools to run tests” on Windows. [#4932](https://github.com/microsoft/vscode-cmake-tools/pull/4932) [@cwalther](https://github.com/cwalther)

## 1.23.52
Expand Down
10 changes: 5 additions & 5 deletions src/diagnostics/gnu-ld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import { oneLess, RawDiagnostic, RawDiagnosticParser, RawRelated, FeedLineResult
// Patterns to identify and capture GNU linker diagnostic messages
const regexPatterns: RegexPattern[] = [
{ // path/to/ld[.exe]:[ ]path/to/file:line: severity: message
regexPattern: /^(?:.*ld(?:\.exe)?:)(?:\s*)?(.+):(\d+):\s+(?:fatal )?(\w+):\s+(.+)/,
regexPattern: /^(?:(?:.*[/\\])?ld(?:\.exe)?:)(?:\s*)?(.+):(\d+):\s+(?:fatal )?(\w+):\s+(.+)/,
matchTypes: [MatchType.Full, MatchType.File, MatchType.Line, MatchType.Severity, MatchType.Message]
},
{ // path/to/ld[.exe]:[ ]path/to/file.obj:path/to/file:line: message
regexPattern: /^(?:.*ld(?:\.exe)?\:)(?:\s*)(?:.+?\.obj:)(.+?):(\d+):\s+(.+)/,
regexPattern: /^(?:(?:.*[/\\])?ld(?:\.exe)?\:)(?:\s*)(?:.+?\.obj:)(.+?):(\d+):\s+(.+)/,
matchTypes: [MatchType.Full, MatchType.File, MatchType.Line, MatchType.Message]
},
{ // path/to/ld[.exe]:[ ]path/to/file:line: message
regexPattern: /^(?:.*ld(?:\.exe)?\:)(?:\s*)?(.+):(\d+):\s+(.+)/,
regexPattern: /^(?:(?:.*[/\\])?ld(?:\.exe)?\:)(?:\s*)?(.+):(\d+):\s+(.+)/,
matchTypes: [MatchType.Full, MatchType.File, MatchType.Line, MatchType.Message]
},
{ // path/to/ld[.exe]: severity: message
regexPattern: /^(.*ld(?:\.exe)?):\s+(?:fatal )?(\w+):\s+(.+)/,
regexPattern: /^((?:.*[/\\])?ld(?:\.exe)?):\s+(?:fatal )?(\w+):\s+(.+)/,
matchTypes: [MatchType.Full, MatchType.File, MatchType.Severity, MatchType.Message]
},
{ // path/to/ld[.exe]: message (without trailing colon)
regexPattern: /^(.*ld(?:\.exe)?):\s+(.+)(?<!:)\s*$/,
regexPattern: /^((?:.*[/\\])?ld(?:\.exe)?):\s+(.+)(?<!:)\s*$/,
matchTypes: [MatchType.Full, MatchType.File, MatchType.Message]
},
{ // path/to/file:line: message (with neither "[fatal] severity:" nor trailing colon nor leading "make: *** [" nor leading "make[line]: *** [")
Expand Down
12 changes: 12 additions & 0 deletions test/unit-tests/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@ suite('Diagnostics', () => {
expect(build_consumer.compilers.gnuld.diagnostics).to.have.length(0);
expect(build_consumer.compilers.gnuld.diagnostics).to.have.length(0);
});
test('No linker error on Zephyr build status line "-- Zephyr version: ..." (issue #4910)', () => {
const lines = ['-- Zephyr version: 4.3.0 (/path/to/zephyr), build: v4.3.0'];
feedLines(build_consumer, [], lines);
expect(build_consumer.compilers.gnuld.diagnostics).to.have.length(0);
expect(build_consumer.compilers.gcc.diagnostics).to.have.length(0);
});
test('No linker error on generic CMake status lines containing "build:" (issue #4910)', () => {
const lines = ['-- Some tool version: 1.0 (/path/to/tool), build: v1.0'];
feedLines(build_consumer, [], lines);
expect(build_consumer.compilers.gnuld.diagnostics).to.have.length(0);
expect(build_consumer.compilers.gcc.diagnostics).to.have.length(0);
});
test('Parsing GHS Diagnostics', () => {
const lines = [
'"C:\\path\\source\\debug\\debug.c", line 631 (col. 3): warning #68-D: integer conversion resulted in a change of sign'
Expand Down
Loading