LuaLS / LuaLS/lua-language-server

`[meta]` annotations should be loaded instead of just reading the file

オープン
#2,358 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

MacOS

What is the issue affecting?

Annotations, Libraries

Expected Behaviour
{
    "Lua.workspace.checkThirdParty": false,
    "diagnostics.groupSeverity": {
        "ambiguity": "Error",
        "await": "Error",
        "codestyle": "Error",
        "duplicate": "Hint",
        "global": "Error",
        "luadoc": "Error",
        "redefined": "Information",
        "strict": "Error",
        "strong": "Error",
        "type-check": "Error",
        "unbalanced": "Error",
        "unused": "Hint",
        "conventions": "Error"
    },
    "diagnostics.disable": [
        "duplicate-doc-alias",
        "duplicate-doc-field"
    ],
    // "runtime.path": [
    //     "?.lua",
    //     "?/init.lua",
    // ],
    "runtime.pathStrict": true,
    "runtime.version": "LuaJIT",
    "workspace.ignoreDir": [
        ".vscode",
        ".luarocks"
    ],
    "workspace.library": [
        "/Users/frityet/Library/Application Support/Code/User/globalStorage/sumneko.lua/addonManager/addons/penlight/module/library",
        "${3rd}/lfs/library",
        "lua_modules/lib/lua/5.1/",
        "lua_modules/share/lua/5.1/",
        "/Users/frityet/Library/Application Support/Code/User/globalStorage/sumneko.lua/addonManager/addons/openresty/module/library"
    ],
    "diagnostics.globals": [
        "ngx"
    ],
}

local stringio = require("pl.stringio")

stringio should use the definition from meta

Actual Behaviour

it reads the real pl.stringio and uses that (which does have't luaLS annotations, etc)

Reproduction steps
  1. Download and load penlight into a directory
  2. Add the penlight addon
  3. require a penlight file
Additional Notes

No response

Log File

file_Users_frityet_Documents_ChatGPT-Plugins_Lua.log

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、require("pl.stringio") が Penlight addon をどのように解決するか、また [meta] アノテーションがどのように処理されるかを追跡し、その経路を実際の pl.stringio ファイルと比較します。完了の条件は、require がアノテーションのないランタイムファイルではなく、LuaLS アノテーションを含む meta アノテーションの定義を使用することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。