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
When I run a task in a split terminal such that long warning/error messages wrap to multiple lines, I get two problems for every message that wraps. The first problem only contains the text on the first line, while the second problem contains the entire warning/error message. I specifically see this problem when building a C file with GCC and using the $gcc problem matcher. I do not know if the issue is specific to that problem matcher or if it is an issue with problem matchers in general.
I use waf.io to manage my build, which has many files, but I believe the problem can be reproduced using just GCC and a single C file. I am using GCC version 6.4.0. My tasks.json looks like this:
{"tasks": [{"label": "build","type": "process","command": "python","args": ["waf.py"],// gcc.exe -Wdeprecated-declarations (plus other options not relevant to this issue)"group": {"kind": "build","isDefault": true},"problemMatcher": [{"base": "$gcc","fileLocation": ["autoDetect","${workspaceFolder}/build"]}]}]}
Then I have a file which generates a long warning message:
// ./compiler.h#if defined(__GNUC__)
#defineDEPRECATED(func) __attribute__ ((deprecated)) func
#else// implementations for other compilers would go here.#defineDEPRECATED(func) func
#endif
// ./some/really/long/path/to/header.h#include"compiler.h"// This used to do something, but now it isn't necessary.staticDEPRECATED( __inlineintold_function(void) )
{
return1;
}
// ./some/really/long/path/to/source.c#include"header.h"intmain(void)
{
if (old_function())
{
// do something
}
}
Compiling this results in a warning which looks something like:
..\some\really\long\path\to\source.c:6:8: warning: 'old_function' is deprecated[-Wdeprecated-declarations]
if (old_function())
^~~~~~~~~~~~
In file included from ..\some\really\long\path\to\header.h:2
..\some\really\long\path\to\source.c:2:
C:\projects\example\some\really\long\path\to\header.h:4:51 note: declared here
static DEPRECATED( __inline void old_function(void) )
^
C:\projects\example\compiler.h note: in definition of macro 'DEPRECATED'
#define DEPRECATED(func) __attribute__ ((deprecated)) func
^~~~
If I am running the build task in a split terminal, that first line tends to get wrapped to something like this:
..\some\really\long\path\to\source.c:5:8: warning: 'old_function' is deprecated[-Wd
eprecated-declarations]
And then in the problems pane I will get two problems:
source.c some\really\long\path\to (2)
'old_function' is deprecated [-Wd gcc [6, 8]
'old_function' is deprecated [-Wdeprecated-declarations] gcc [6, 8]
If I run the build task in a terminal that is wide enough that the warning does not get wrapped, then only one problem appears, as I would expect.
VS Code version: Code 1.36.1 (2213894, 2019-07-08T22:59:35.033Z)
OS version: Windows_NT x64 6.1.7601
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3392)
Are you running Windows 10? I was seeing the issue on Windows 7, so it's possible this only occurs on Windows 7 or when terminal.integrated.windowsEnableConpty is false.
Sorry about that, it's a Windows specific issue and it happens regardless of the Windows version. The repro is to make your terminal very narrow then run a task that causes problems.
Issue Type: Bug
When I run a task in a split terminal such that long warning/error messages wrap to multiple lines, I get two problems for every message that wraps. The first problem only contains the text on the first line, while the second problem contains the entire warning/error message. I specifically see this problem when building a C file with GCC and using the $gcc problem matcher. I do not know if the issue is specific to that problem matcher or if it is an issue with problem matchers in general.
I use waf.io to manage my build, which has many files, but I believe the problem can be reproduced using just GCC and a single C file. I am using GCC version 6.4.0. My tasks.json looks like this:
Then I have a file which generates a long warning message:
Compiling this results in a warning which looks something like:
If I am running the build task in a split terminal, that first line tends to get wrapped to something like this:
And then in the problems pane I will get two problems:
If I run the build task in a terminal that is wide enough that the warning does not get wrapped, then only one problem appears, as I would expect.
VS Code version: Code 1.36.1 (2213894, 2019-07-08T22:59:35.033Z)
OS version: Windows_NT x64 6.1.7601
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Extensions
The text was updated successfully, but these errors were encountered: