Closed lkrms closed 1 year ago
Where can I find these messages?
I noticed these messages in the developer tools console that are opened from the command palette. I couldn't find a console.warn
responsible if I remember correctly, so I think it is maybe part of the LSP protocol.
Just run a command like code --list-extensions
from a terminal session. The errors appear before the extension list for me.
They do also show up in the developer tools console.
I noticed these messages in the developer tools console that are opened from the command palette. I couldn't find a
console.warn
responsible if I remember correctly, so I think it is maybe part of the LSP protocol.
The message appears to be logged by a localisation framework (I'm guessing it's this one?), so that's where you're most likely to find the relevant console.warn
.
Incidentally, I'm running VSCode in the en_AU.utf8 locale, which may be relevant if you happen to be using a non-English locale, perhaps with a more complete translation file?
Given how often my terminal fills up with these errors, I cloned the repo to investigate further.
As best I can tell, you're generating package.json
, package.nls.json
, etc. from a Lua build tool + separate schema, so I couldn't jump in and prepare a PR, but I can confirm that out of the 28 missing keys:
package.nls[.<locale>].json
fileenum
values where no description has been given in setting/schema*.json
""
) description in setting/schema*.json
(config.diagnostics.circle-doc-class
)Rather than generating a translation file with empty values, or adding redundant descriptions to enum
values that are self-documenting, suppressing "description"
fields when generating package.json
if there is no known description should solve this issue without any loss of functionality and (theoretically, at least) minimal loss of time.
Note, this issue is also tracked here: https://github.com/LuaLS/lua-language-server/issues/1845
This was almost fixed in e6b153552866a565a91d94de465873c6cc754ad7 as suggested in this comment, but sadly empty strings ""
don't solve the issue. If you provide any non-empty string (e.g. "TODO: Add documentation"
) it fixes all the errors. So close.
In the meantime, you can hotfix your local extension to suppress the error:
sed -i.bak -e 's/""/"TODO: Add documentation"/' ~/.vscode/extensions/sumneko.lua*/*.nls*.json
And if you want to revert back to the release version just run:
code --uninstall-extension sumneko.lua
rm -rf ~/.vscode/extensions/sumneko.lua*
code --install-extension sumneko.lua
@lkrms: I too couldn't figure out the build system to prepare a PR (and I tried).
@sumneko: Any chance we could get some documentation on how to get a development environment setup for vscode-lua? I tried on this branch but did not get a functioning Lua environment setup. Would love some notes about your development workflow.
Since a recent update to this extension (I'm not sure which one, sorry), I've started seeing errors like the below whenever I run
code
from a terminal (e.g. when provisioning vscode extensions from shell scripts).Although it doesn't break anything, it does bloat the output of scripts and obfuscates important messages.
The values listed don't appear in the extension's
package.nls.json
file, so presumably resolving the issue should be as simple as adding them?Thanks for all of your work on a great extension!