microsoft / microsoft/TypeScript
Boolean CLI options in standard "--someFlag=someValue" form fail with "error TS5023: Unknown compiler option..."
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.4k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện các lỗi TS5023 được báo cáo đối với --incremental=false và --noEmit=false, sau đó lần theo quá trình phân tích các tùy chọn dòng lệnh của compiler. So sánh các dạng này với hành vi hiện có của các tùy chọn boolean và xác minh rằng --flag=value được chấp nhận với giá trị mong đợi, bao gồm cả các ví dụ trong issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- cli, compilers
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100