racz16 / WebGL-GLSL-Editor

WebGL GLSL shader editor extension for Visual Studio Code.
Other
100 stars 12 forks source link

Diagnostics are broken on MacOS #34

Closed Nek closed 1 year ago

Nek commented 1 year ago

Hello.

I've installed v1.3.3 of the extension both for VSCodium and VSCode and it ended with [error] Error: write EPIPE in Output > Extension Host. I'm on Apple Silicon Ventura. I've solved the problem by replacing glslangValidator with the current version from homebrew.

Possible solution: allow configuring the path to glslangValidator.

racz16 commented 1 year ago

Hi, sorry for the late answer. Unfortunately, I don't really know how things work on Mac and I don't own any Apple devices. The diagnostics work like this: there are platform-specific GLSL compilers in the res/bin folder and I run them in the GlslDiagnosticProvider class. This works on Windows and Linux, but I can imagine Apple has more restrictive rules about running executables. Or maybe it's just like on Linux, where you have to mark the compiler as an executable?

While I can't solve the problem, because I can't try it out on Mac, if you know how to fix it, feel free to create a Pull request and I'll accept it if it doesn't cause any problems on Windows and Linux.

matt-curtis commented 1 year ago

👋 @Nek I attempted to fix this in #36. If you have the chance, I'd love to know if it works for you.

For anyone else looking to solve this in the mean time, it may help to run:

chmod +x ~/.vscode/extensions/raczzalan.webgl-glsl-editor-[version]-darwin-arm64/res/bin/glslangValidatorMac

(replacing [version] with whatever version you have installed.)

racz16 commented 1 year ago

38 Fixed it, thank you, guys!

matt-curtis commented 10 months ago

@racz16 Hi there! It seems like a version of this bug has returned. If I use the latest version (1.3.7) the extension's install looks different: I'm no longer getting the darwin-arm64-specific version of the extension, and as a result, I'm not getting any res/bin folder, and subsequently not getting the glslang validator, which means I'm not getting any diagnostics. If I downgrade to 1.3.5, things work again. Was there a change recently that caused this?

1valdis commented 5 months ago

Can confirm, with extension version 1.3.8 diagnostics don't work, while on 1.3.5 they do work.