microsoft / microsoft/TypeScript
Boolean CLI options in standard "--someFlag=someValue" form fail with "error TS5023: Unknown compiler option..."
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Bug Report
tl;dr: User's expect to assign CLI flag options with an equal sign. E.g.--flag=value. That this fails in tsc with an unobvious error is confusing. It misleads users into thinking there isn't a way of disabling options from the command line. For example:
Even if you wanted to forgo the speed benefits of "incremental"... you can't turn it off temporarily because there is no --noIncremental (or analogous) flag.
The form above is wide-spread, especially within the JS community ...
🔎 Search Terms
error TS5023: Unknown compiler option
🕗 Version & Regression Information
Boolean CLI options were first introduced in #11798 , but have never supported the standard --flag=value format
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
🙁 Actual behavior
Providing boolean CLI options like --incremental=false, --noEmit=false, and so on all result in a TS5023: Unknown compiler option error.
🙂 Expected behavior
Using the standard double-dash notation of "--flagName=flagValue" (.e.g --incremental=false) should work as expected.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、--incremental=false と --noEmit=false で報告された TS5023 エラーを再現し、次にコンパイラのコマンドラインオプション解析を追跡します。これらの形式を既存の boolean オプションの動作と比較し、issue 内の例を含め、--flag=value が期待される値で受け付けられることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- cli, compilers
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100