LuaLS / LuaLS/lua-language-server
How to make a third-party member function as deprecated
オープン
まだ誰も着手していません。
enhancement
- 主要言語
- 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?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
---@deprecated
M.add = M.add
The left one should have marked as deprecated immediately when used such as u:add
Actual Behaviour
- it not works first.
- and works unexpectedly.
Reproduction steps
- Write the code
-- File A
---@class A
local A = {}
---@param attr string
function A.add(attr)
end
-- File B
---@class A
local B = A
---@deprecated
B.add = A.add
B.add('some attr')
We'll find that B.add havn't marked as deprecated
2. Keep write the followed
-- File C
---@class A
---@field add fun(attr: string)
local C = A
Additional Notes
My original intention was to mark a third-party member function as deprecated.
As there was no straightforward way, I think, to do it, I had to use a lot of tricks, which led to more subsequent problems.
Log File
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue にある File A、File B、File C の再現から始め、非推奨の代入後に診断が B.add をどのようにマークするかに注目してください。Visual Studio Code 拡張機能で再現を実行し、観測された診断を B.add に対して期待される非推奨警告と比較してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100