danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
258 stars 28 forks source link

Better support for warnings #4

Open TheHugeManatee opened 6 years ago

TheHugeManatee commented 6 years ago

Description

Warnings are displayed as errors in both the Error List window and the "squiggle" lines color, where they should be marked as warnings and treated with a different squiggle line color Additionally, if two warnings/errors occur on the same line, in the code editor only the second one is shown when hovering over the squiggle lines.

Steps to recreate

#version 330
in vec3 ex_TexCoord;
out vec4 out_Color;

#include "tools/shading.frag"

void main() {
    out_Color = vec4(1.0);
}

As I am on a multi-GPU system, I am not 100% sure which GPU the plugin is using, but based on the error message output I guess it is using the NVidia driver (another option to select the GPU or even test on all GPUs would of course be super..). The #include line produces an error as well as a warning:

error C0109: Can't open include file "tools/shading.frag"
warning C7529: OpenGL does not allow #include directives
danielscherzer commented 6 years ago

Sadly, these problems are known to me. Documentation on the Microsoft side how to create different squiggles for errors and warnings is as far as I know non existant. I found some hints and currently (0.2.30) squiggles are shown in different colors for warnings and errors, but only when I run the extension in the debug version of Visual Studio.... If you stumble on any code that successfully uses multiple squiggle colors I'm happy to take a look.

danielscherzer commented 4 years ago

I now create either warning or error squiggles. If two errors are in the same line regrettably in most shader compilers the information to distinguish the two is not given (only the line number). So I could only create a solution for some compilers, which I would like to avoid.