Is recursive disk search desired/intended?

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust, vim

調査の方向性

Read the linked ftplugin/rust.vim lines 17–23 to understand the recursive search and how it selects makeprg. Decide whether Cargo should be the default or whether a global setting should control the search; the issue does not record a decision. Done means agreeing on the intended behavior and updating the Rust file-opening behavior accordingly.

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

説明

Right now, every time a rust file is opened, a recursive disk search is done until either the root is reached or cargo.toml is found: https://github.com/rust-lang/rust.vim/blob/87c745d8d506fc1eecc1d81df15d5bde1658a2fc/ftplugin/rust.vim#L17-L23

Maybe cargo build should just be the default? I imagine few users use the behavior where makeprg builds the current file into an executable directly using rustc (which is what makeprg will do if no cargo.toml is found). If anyone exactly wants this exact behavior, they could also just add it to their own after/ftplugin/rust.vim. Alternatively, maybe this search should be hidden behind a global setting which is off by default?

Not sure how much this really matters in practice, so this might be premature optimization. However, opening a rust file really shouldn't trigger this much filesystem access. This isn't a zero cost abstraction : ).

Related: https://github.com/ziglang/zig.vim/pull/40#discussion_r578754774

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

rust-lang/rust.vim のほかの issue

rust-lang/rust.vim の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

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

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