$E_FN crashes or uses the wrong file outside :ExecutorRun
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
まず run_one_off_cmd、set_task_command、get_relative_buffer_name を読み、issue で古い、または nil のバッファーパスが報告されている箇所を確認してください。Neovim で両方のケースを再現します。:ExecutorRun の前に :ExecutorOneOff を実行し、その後、:ExecutorRun の実行後に別のバッファから実行してください。該当するパスのバッファー選択を更新し、$E_FN がクラッシュせずに現在のファイルを使うことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
:ExecutorRun records the current buffer, and $E_FN uses that recorded buffer. Other ways of running or setting a command do not record it first, so $E_FN either crashes or uses the wrong file.
Steps to reproduce
Crash
- Start Neovim and open any file.
- Before running
:ExecutorRun, run:ExecutorOneOff echo $E_FN. - The command fails with
Invalid 'buf': Expected Lua number. The error comes fromnvim_buf_get_name(nil)inget_relative_buffer_name.
Wrong file
- Open
a.jsand run:ExecutorRunonce. - Switch to
b.js. - Run
:ExecutorOneOff echo $E_FN. The command runs ona.jsinstead ofb.js.
Affected paths
last_active_buf_id is set only in Executor.run(). These paths read it before it is set, or after it has gone stale:
:ExecutorOneOff(run_one_off_cmd).- Choosing a preset.
set_task_commandruns beforeExecutor.run()records the buffer. - Choosing an entry from the history picker. This path also calls
set_task_commandbeforeExecutor.run(). require("executor").api.set_task_commandandapi.run_task.
Possible fix
Record the current buffer in run_one_off_cmd and set_task_command. Alternatively, read the current buffer directly when last_active_buf_id is nil.
- 主要言語
- Lua
- スター
- 161
- フォーク
- 12
- 平均マージ
- 25分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/executor.nvim のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
google/executor.nvim#46 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
google/executor.nvim#38 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
google/executor.nvim#35 ·
-
[Feature Request] Option to run ExecutorShowDetail when the current task finishes対応中かも @jackfranklin が 513 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
google/executor.nvim#33 · コメント 9 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
google/executor.nvim#26 · コメント 3 件 ·
google/executor.nvim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
teradata-labs/loom#624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
lsp
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
neovim/neovim#42774 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信