Dead code in PL IR: unused fold_func_param, write-only prev_columns, unreachable display_ids
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the cited locations in prqlc/prqlc/src/ir/pl/fold.rs and prqlc/prqlc/src/ir/pl/lineage.rs, then trace callers and implementations of PlFold, Lineage::clear, and display_lineage. Check whether the fields and branches are intentionally needed before proposing removals; done means each item is either safely removed or its purpose and required follow-up are documented, with relevant tests passing.
索引モデルが issue の本文から書いたものです。
説明
The nightly survey (2026-04-12) identified several pieces of dead code in the PL IR and related modules. These are structural enough that they may warrant maintainer review before removal.
1. fold_func_param is never called
fold.rs:289 exports fold_func_param but it has zero callers. The default fold_func implementation uses struct spread and only folds body and args, skipping FuncParam::default_value and Func::env. This means all PlFold implementors miss expressions within default parameter values and captured environments.
This could be a latent correctness issue if any fold pass needs to visit those fields, or it could be intentional if those fields are always resolved before folding occurs.
2. Lineage::prev_columns is write-only
lineage.rs:21 defines prev_columns which is populated by Lineage::clear() but never read anywhere. The comment says it is "A hack that allows name retention when applying ExprKind::All { except }", but no code reads it. It is also #[serde(skip)].
3. display_ids parameter is always false
lineage.rs:74 display_lineage accepts display_ids: bool but the only call site always passes false, making the true branch unreachable. Appears to be an unfinished debugging aid.
- 主要言語
- Rust
- スター
- 10.9k
- フォーク
- 261
- 平均マージ
- 3日 21時間
- マージ済み PR(30日)
- 84
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PRQL/prql のほかの issue
-
Underscore does not work as expected対応中かも @prql-bot が 4 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
prqlc Debug Report HTML Does Not Escape Source File Name, Enabling Stored XSS via PRQLC_DEBUG_LOGオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 3 日以内に返信
-
friendliness integrations
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
PRQL/prql#1636 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 12/100
メンテナーはふだん 3 日以内に返信
-
review-runs-tracking
難易度 3/5 半日 初心者へのやさしさ 5/100
メンテナーはふだん 3 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ScoopInstaller/Extras#19275 ·
メンテナーはふだん 1 日以内に返信
-
area:plugins kind:bug priority:p2 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug priority: medium ui
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
storytold/gridcraft#3496 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bip39: Mnemonic::new_from_phrase rejects phrases with extra or non-space whitespace対応中かも @chukwudiikeh が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信