-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slangd fails to start with Neovim LSP due NULL/missing value in JSON #3322
Comments
I think your workaround makes sense by treating null as empty string. Can you open a PR from your branch? |
This allows using `slangd` with Neovim as Neovim sets some value `slangd` expects as a String to `null`. Fixes shader-slang#3322
This allows using `slangd` with Neovim as Neovim sets some value `slangd` expects as a String to `null`. Fixes shader-slang#3322
I think this would probably better to just return UnownedStringSlice() rather than UnownedStringSlice("", 0). |
If you are using the release build, that |
I remember that the release build crashed with |
I see. So the real issue is still something different. |
First, thanks for this awesome project!
When I was playing around with it I tried to use
slangd
with Neovim's built-in LSP implementation, I realized that it was crashing for some reason. I tried to debug the reason with gdb and saw thatslangd
was hitting this assert hereslang/source/compiler-core/slang-json-value.cpp
Line 614 in 011d428
in
value in this function was of typeJSONValue::Type::Null
. I couldn't debug yet which value slang was expecting or whether this value was allowed to benull
/missing according to the LSP specification (no experience with slangs code base yet).Applying the following workaround
theHamsta@643393c, makes slangd working as expected with Neovim using the following config for https://github.com/neovim/nvim-lspconfig
--debug
is only used to be able to attach gdb in a sudo shell withgdb -p $(pgrep slangd)
Here Neovim's LSP log when opening a single slang file when using it with unpatched
slangd
(withrequire("vim.lsp.log").set_level(vim.log.levels.DEBUG)
:with
The text was updated successfully, but these errors were encountered: