LuaLS / LuaLS/lua-language-server
Generated doc JSON is invalid utf-8
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 442
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows WSL
What is the issue affecting?
Other
Expected Behaviour
JSON document output from --doc is standard utf-8 encoding.
Actual Behaviour
When trying to parse the JSON with our site builder, Ruby fails with:
jekyll 3.9.3 | Error: (/home/rhys/spring/doc/site/_data/doc.json): invalid leading UTF-8 octet at line 1 column 1
/usr/share/rvm/rubies/ruby-3.2.3/lib/ruby/3.2.0/psych/parser.rb:62:in `_native_parse': (/home/rhys/spring/doc/site/_data/doc.json): invalid leading UTF-8 octet at line 1 column 1 (Psych::SyntaxError)
from /usr/share/rvm/rubies/ruby-3.2.3/lib/ruby/3.2.0/psych/parser.rb:62:in `parse'
from /usr/share/rvm/gems/ruby-3.2.3/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `load'
Opening the file in VSCode suggests that it is indeed utf-8, but clicking UTF-8 in the footer and then "Save with encoding > UTF-8" reserializes the file and the parser error is cleared.
Sorry I'm not more specific with the error, I don't know a great deal about file formats.
Reproduction steps
- Export docs
- Somehow check if they are properly encoded?
Additional Notes
No response
Log File
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso dell’esportazione della documentazione invocato da --doc, quindi riproduci l’esportazione e ispeziona i primi byte del JSON generato. L’issue è completata quando il documento esportato viene analizzato correttamente come UTF-8 standard nel site builder Ruby/Jekyll indicato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua
- Ambito
- documentation
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100