microsoft / microsoft/TypeScript
Boolean CLI options in standard "--someFlag=someValue" form fail with "error TS5023: Unknown compiler option..."
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie damit, die gemeldeten TS5023-Fehler für --incremental=false und --noEmit=false zu reproduzieren, und verfolgen Sie anschließend die Analyse der Befehlszeilenoptionen des Compilers. Vergleichen Sie diese Formen mit dem bestehenden Verhalten boolescher Optionen und überprüfen Sie, dass --flag=value mit dem erwarteten Wert akzeptiert wird, einschließlich der Beispiele im issue.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- cli, compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100