microsoft / microsoft/vscode-cpptools

Compile single file, Preprocess single file

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

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

Feature Request help wanted Language Service tasks/build/debug
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

Type: Feature Request

In a separate discussion regarding compile_commands.json I outlined that the data contained within this json could be a great stepping-off point for a compile single file / preprocess single file feature in vscode: https://github.com/microsoft/vscode-cpptools/discussions/8308

Since the json has the path to the compiler and all the compiler arguments, it's all the information one needs to implement this feature. Typically compile single / preprocess single typically decorates a TU alongside a module compilation unit, its frequently overlooked, and tricky to add later (omit sibling TUs, skip calling linker). It's not unreasonable to "compile" arbitrary .h files, anything with compiler rules, just to a temp object. Likewise with preprocessing a file, it doesn't matter if the file in question is directly mentioned in a module build unit to be able to preprocess and present the preprocessor output in a temp document.

These features are useful in a tight iteration loop because full-bore builds may consider dozens or hundreds of units that end up generating redundant errors, and waste precious seconds delivering a round of errors into the eyeballs of the engineer. Likewise, preprocessing a file to a temp is a key iteration loop when authoring and testing tricky macro expansions.

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

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

はじめの一歩

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

調査の方向性

リンクされている compile_commands.json の議論と vscode-cpptools 拡張機能のコンテキストから始めて、コンパイラのパスと引数がどのように公開されるかを理解してください。選択したファイルを独立してコンパイルまたは前処理でき、完全なビルドやリンカーを実行せずに一時的なオブジェクトまたはプリプロセッサ出力ドキュメントを生成できれば、この機能は完成です。

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

評価

技術スタック
cpp, typescript, vscode
領域
build-system, compilers, devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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