LuaLS / LuaLS/lua-language-server
Generated doc JSON is invalid utf-8
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ điểm vào xuất tài liệu được gọi bởi --doc, sau đó tái hiện việc xuất và kiểm tra các byte đầu tiên của JSON được tạo. Issue được hoàn tất khi tài liệu đã xuất được phân tích thành công dưới dạng UTF-8 chuẩn trong trình tạo site Ruby/Jekyll được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua
- Lĩnh vực
- documentation
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100