-
Notifications
You must be signed in to change notification settings - Fork 720
Implement printAllHelp to fix tsgo --all
producing no output
#1843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
tsgo --all
producing no output
@copilot double check that this PR matches the implementation in |
…sections to --all help Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Verified! The implementation now matches
Also exported Changes in commit 0e6e9e2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the missing printAllHelp
function to fix the issue where tsgo --all
and tsgo --help --all
produced no output instead of showing comprehensive help information like the TypeScript compiler.
- Implemented the complete
printAllHelp
function with three sections: ALL COMPILER OPTIONS, WATCH OPTIONS, and BUILD OPTIONS - Fixed category ordering in
generateSectionOptionsOutput
to maintain consistent output instead of random map iteration order - Exported
OptionsForWatch
andOptionsForBuild
variables to match TypeScript naming conventions and make them accessible for help display
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
testdata/baselines/reference/tsc/commandLine/help-all.js | Added comprehensive baseline output showing all 646 lines of help content with proper formatting and sections |
internal/tsoptions/namemap.go | Updated reference from optionsForWatch to exported OptionsForWatch |
internal/tsoptions/diagnostics.go | Updated reference from optionsForWatch to exported OptionsForWatch |
internal/tsoptions/declswatch.go | Exported optionsForWatch as OptionsForWatch for external access |
internal/tsoptions/declsbuild.go | Exported optionsForBuild as OptionsForBuild and moved BuildOpts definition after the exported variable |
internal/execute/tsc/help.go | Implemented printAllHelp function and fixed category ordering bug in generateSectionOptionsOutput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I diffed this against the submodule's tsc --all
and they are nearly identical outside removed options and some unrelated option ordering differences that need to be fixed in another PR.
Fixes the issue where
tsgo --all
andtsgo --help --all
produced no output, while the TypeScript compilertsc --all
displays comprehensive help information showing all compiler options.Problem
The
--all
flag is meant to show an expanded version of the help information with all possible compiler options grouped by category. However, the implementation was incomplete:Solution
Implemented the
printAllHelp
function to match the TypeScript source of truth in_submodules/TypeScript/src/compiler/executeCommandLine.ts
. The function now:Also fixed a bug in
generateSectionOptionsOutput
where categories were being output in random order due to Go map iteration. Now maintains category order based on first occurrence in the sorted options list, ensuring consistent output.Additionally exported
OptionsForWatch
andOptionsForBuild
to match the TypeScript naming convention and make these option lists available for the help display.Result
Both
tsgo --all
andtsgo --help --all
now produce 646 lines of comprehensive help output showing all TypeScript compiler options, watch options, and build options, matching the behavior of the official TypeScript compiler.Fixes #1798
Original prompt
Fixes #1798
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.