LuaLS / LuaLS/vscode-lua

"Lua PSI Viewer" feature not working.

未關閉
#172 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
TypeScript
星號
215
分支
62
PR 合併指標
30 天內沒有已合併 PR

描述

Which OS are you using?

Linux

Expected Behaviour

The "Lua PSI Viewer" feature, when ran, it expects some index.html file to be at this path:
~/.vscode/extensions/sumneko.lua-3.15.0-linux-x64/client/web/dist/index.html
but presumably the index.html file path actually exists here
~/.vscode/extensions/sumneko.lua-3.15.0-linux-x64/client/webvue/build/index.html

The error happens because of exactly this line:
https://github.com/LuaLS/vscode-lua/blob/9e91c07ce7b3b9fa162763b0eb7d39cf90033798/client/src/psi/psiViewer.ts#L18

so just do:

-     private static readonly distDirectory = "client/web/dist";
+     private static readonly distDirectory = "client/webvue/build";
Reproduction steps

Steps to reproduce:

<Ctrl+Shift+P>
Type: Lua PSI Viewer

Image

get this error message:

Image
Additional Notes

the bug got introduces in ~3 years ago, by commit 1c7a326

i actually dont know what this "Lua PSI Viewer" feature is for :P
Im curious to find out when it works (again)

Also, I was considering making this a pull request, but i dont know how to compile/run this project, so i cant test fix sry ):

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

檢查 client/src/psi/psiViewer.ts,尤其是 distDirectory 的值以及 PSI Viewer 如何解析 index.html。從 Command Palette 中重新執行 Lua PSI Viewer 指令,並確認使用的是封裝後的 client/webvue/build/index.html 路徑。檢視器能夠在沒有缺少檔案錯誤的情況下開啟,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
typescript, vscode
領域
devtools
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
58/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。