Plenary's global `busted` definitions get picked up by LuaLS
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by locating Plenary's bundled busted implementation and the global assignments it exposes, then reproduce how LuaLS indexes those definitions. Decide on a solution that prevents the bundled globals from being selected while preserving existing plugin behavior; done means real busted definitions are used for navigation without breaking Plenary tests.
索引モデルが issue の本文から書いたものです。
説明
Hello.
Plenary has its own implementation of busted, and just like the real busted it defines a bunch of global variables. This is a problem when using LuaLS because these definitions will be added to the global namespace even if I never require their source file because LuaLS sees a global assignment and adds the variable regardless of whether the file is ever sourced. I use the real busted for my tests, so this means that jumping to the definition will jump to the wrong functions.
How can we fix this? I can think of two solutions:
- Use string variables and indices to assign to
_G, i.e. instead ofdescribe = mod.describeuselocal name = 'describe'; _G[name] = mod.describe, this will stop the language server from adding the definition. - Move the plenary busted functionality to a separate plugin that plugin authors can
packaddbefore running tests. Then I don't have to install the plenary busted plugin and everything is fine.
Personally I think the second option would be better because it does not disrupt any existing plugins that depend on it, but it is a bit uglier in the code. What do you think? Any other idea?
- 主要言語
- Lua
- スター
- 3.5k
- フォーク
- 340
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nvim-lua/plenary.nvim のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
nvim-lua/plenary.nvim#682 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
nvim-lua/plenary.nvim#680 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
nvim-lua/plenary.nvim#675 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
nvim-lua/plenary.nvim#672 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nvim-lua/plenary.nvim#671 · コメント 1 件 ·
nvim-lua/plenary.nvim の issue をすべて見る
似ている issue
-
Zenmap bugオープンZenmap
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
[BUG] [25.12.5]オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pterodactyl/game-eggs#637 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
koreader/koreader#16115 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信