-
Notifications
You must be signed in to change notification settings - Fork 626
feat: display goos & goarch #881
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
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 enhances the CLI output by appending the host OS and CPU architecture to the compiler version and help header.
- Append
GOOS/GOARCH
toprintVersion
output - Include
GOOS/GOARCH
in the help header format
Comments suppressed due to low confidence (1)
internal/execute/outputs.go:98
- Add unit tests to verify that
printVersion
includesruntime.GOOS
andruntime.GOARCH
in its output for different OS/architecture combinations.
fmt.Fprint(sys.Writer(), diagnostics.Version_0.Format(core.Version)+" "+runtime.GOOS+"/"+runtime.GOARCH+sys.NewLine())
@@ -158,7 +158,7 @@ func printEasyHelp(sys System, simpleOptions []*tsoptions.CommandLineOption) { | |||
output = append(output, " ", desc.Format(), sys.NewLine(), sys.NewLine()) | |||
} | |||
|
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.
Update the project documentation or CLI usage guide (e.g., README) to mention that the version and help output now display the host GOOS/GOARCH
information.
// Note: Ensure that the CLI usage guide or README is updated to mention that the version and help output | |
// now display the host GOOS/GOARCH information (e.g., "linux/amd64"). |
Copilot uses AI. Check for mistakes.
I don't think this is useful; a user probably already knows what kind of system they're running on. That and, this text cannot change as it's a "load-bearing" string that people parse. |
Horrifying but I guess I shouldn't be surprised. |
Some operating systems, including macOS and Windows, support running x86/x64 programs on Arm hardware through compatibility layers, but performance is significantly reduced. Providing this information helps users identify and choose the binary that best suits their system. |
Considering compatibility with 5.x, do you think this minor change is acceptable? As for parsing, the |
I just don't think it's required. I don't know of any other application which does this, outside |
This information is already included in all CLI programs that use CAC. See https://www.npmjs.com/browse/depended/cac
Please feel free to close the PR if you don't find it helpful. |
Since the build of TypeScript Go depends on the operating system and CPU architecture, it also outputs
GOOS
andGOARCH
accordingly.