danielscherzer / GLSL

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

No more error tagging with squiggles #67

Closed Cewein closed 3 years ago

Cewein commented 4 years ago

Installed product versions

Steps to recreate

update to lastest version

Current behavior

there is no more error tagging with squiggles, syntaxe highlight is still here and error list is still here too. I've uninstall and reinstall the add-on several time to see if it fix it or not, even with both Market place and CLI build but it seem to have nothing. tried in a new projet, also nothing.

danielscherzer commented 4 years ago

Thanks for your feedback! I'm using the latest version with working squiggles, but with Visual Studio 2019. I have no machine with 2017 for testing with that version. Could you try out older versions of the extension from https://github.com/danielscherzer/GLSL/releases and tell me which release breaks the squiggles for you?

Cewein commented 4 years ago

Alright, so i've checked and the last working version for VS2017 is the 0.8.105 !

danielscherzer commented 4 years ago

One of the changes I did starting with newer versions is to compile on the CI with VS2019. I changed this back to VS 2017 maybe this helps.... Please try out release https://github.com/danielscherzer/GLSL/releases/tag/0.10.114

Cewein commented 4 years ago

Sorry for the long delay, i way away from computor for the last 15 days. I've tested the new versions you provided and it still seem to not work sadly. if you have any idea where this could come i can try to look around with you.

spfuetzner commented 3 years ago

I can confirm that error squiggles are not working. I'm using VS2019!

I installed version 0.8.105 right after I installed VS, everything worked. Then I updated to 0.10.115 from inside VS and the squiggles stopped working. With bisection I found out, that version 0.8.106 is the first non-working version for me. Maybe it's a coincidence that this is one version after the working one. Or the update mechanism damaged something.

In the general output window the error output is vissible, just the error squiggles are missing. Also using an external compiler in the options didn't work.

spfuetzner commented 3 years ago

I also disabled all other extension, but I still have the same problem. Another thing I discovered: In the latest version 0.10.115, even the compiler output is not shown anymore in the output window.

danielscherzer commented 3 years ago

thanks for the feedback! I just tried the extension on every machine I have available (all VS2019) and all my instances are working as expected :-(

danielscherzer commented 3 years ago

Is there any difference between internal / external compiler for you? There should be a log file in C:\Users\ [User]\AppData\Local\Temp\GLSL VSX language extension.log

spfuetzner commented 3 years ago

No. When I updated to 0.10.115, I saw that the options were reset to default. Normally there are many errors in my Vulkan shaders until I set the glslangValidator as an external compiler. Error squiggles are missing in both cases.

But the log file reveals some hints:

[09.24 09:57:59.290] Using external compiler 'C:\VulkanSDK\1.2.148.1\Bin\glslangValidator.exe' with arguments '-C -r -w --target_env vulkan1.1 --target_env vulkan1.2' on temporal shader file 'C:\Users\kiba\AppData\Local\Temp\shader.frag' 
[09.24 09:57:59.310] Dumping shader log:
C:\VulkanSDK\1.2.148.1\Bin\glslangValidator.exe: Error: --target_env: unrecognized command-line option (use -h for usage)

It has something to do with the arguments. I also tried:

"-C -r -w --target_env vulkan1.1 --target_env vulkan1.2"

and:

-C -r -w "--target_env vulkan1.1" "--target_env vulkan1.2"

resulting in different errors of unrecognized command-line option.

spfuetzner commented 3 years ago

Ok, if I use the "" around the arguments like this:

"-C -r -w --target_env vulkan1.1 --target_env vulkan1.2"

error squiggles are back! But the log is full of errors from the internal compiler not recognizing the vulkan mode. Strange... It looks like the external compiler is ignored now because the editor undelines gl_VertexIndex and other Vulkan constructs.

danielscherzer commented 3 years ago

Could you sent to me a shader + settings + resulting log, so I may reproduce the error. By the way: If there is an error parsing the compiler output, there should be an information message in the error list.

spfuetzner commented 3 years ago

Sorry, the arguments seem to be forwarded correctly, it was "--target-env" instead of "--target_env". But the problem is still there.

The shader "test.vert":

#version 460

void main()
{
    gl_Position = vec3(0);
}

With default settings it shows an error in line 5 in the error list and error squiggles in the correct line.

Then I set the External compiler to:

C:\VulkanSDK\1.2.148.1\Bin\glslangValidator.exe

For this I installed the newest Lunarg Vulkan SDK to the default location. The Arguments for the external compiler are set to:

-C -r -w --target_env vulkan1.1 --target_env vulkan1.2

No error and no squiggles are shown. The newly created log file contains:

[09.28 08:49:39.086] Using external compiler 'C:\VulkanSDK\1.2.148.1\Bin\glslangValidator.exe' with arguments '-C -r -w --target-env vulkan1.1 --target-env vulkan1.2' on temporal shader file 'C:\Users\kiba\AppData\Local\Temp\shader.vert' 
[09.28 08:49:39.177] Dumping shader log:
C:\Users\kiba\AppData\Local\Temp\shader.vert
ERROR: C:\Users\kiba\AppData\Local\Temp\shader.vert:5: 'assign' :  cannot convert from ' const 3-component vector of float' to ' gl_Position 4-component vector of float Position'
ERROR: 1 compilation errors.  No code generated.

SPIR-V is not generated for failed compile or link

Hope this helps.

spfuetzner commented 3 years ago

After looking closer, I now found the errors in the Visual Studio Error List under informational messages. So it seems they have the wrong log level?

Mmh, these are not just my shader errors:

Severity    Code    Description Project File    Line    Suppression State
Message     Could not parse line 'ERROR: C:\Users\kiba\AppData\Local\Temp\shader.vert:5: 'assign' :  cannot convert from ' const 3-component vector of float' to ' gl_Position 4-component vector of float Position''       C:\Users\kiba\Desktop\test\test.vert    1   

Maybe there are not only changed arguments in this release of glslangValidator but also the ouput is different?

danielscherzer commented 3 years ago

Indeed, the format of the output has changed. I made an update that should handle these changes.

spfuetzner commented 3 years ago

I can confirm that the problem is now solved. Thanks a lot!

danielscherzer commented 3 years ago

Thanks for the feedback! Is it also working for @Cewein?

danielscherzer commented 3 years ago

I updated the argument description to avoid the hickups with the quotations:

Command line arguments for the external compiler executable. 
Can contain environment variables, like %USERPROFILE% and 
also the Visual Studio variable $(SolutionDir). 
A single argument that includes spaces must be surrounded by quotation marks, 
but those quotation marks are not carried through to the target application. 
In include quotation marks in the final parsed argument, triple-escape each mark.
danielscherzer commented 3 years ago

This issue seems resolved. Please reopen if not!