Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes compatibility issues with the Go binary build process on Windows by simplifying the output path specification. The change removes the explicit executable extension handling and lets the Go compiler automatically determine the correct binary name and extension for the target platform.
- Simplified Go build output path from explicit binary naming to directory-only specification
- Removed manual
$(go env GOEXE)extension handling that was causing Windows compatibility issues
Comment on lines
+15
to
+16
| "build:bin": "go build -v -o bin/ ../../cmd/rslint", | ||
| "build:debug": "GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/ ../../cmd/rslint ", |
There was a problem hiding this comment.
The output path 'bin/' relies on Go's default binary naming. Consider verifying that other parts of the codebase that reference the binary (like VS Code extension or CLI wrappers) can correctly locate the binary with its platform-specific name (e.g., 'rslint' on Unix, 'rslint.exe' on Windows).
Suggested change
| "build:bin": "go build -v -o bin/ ../../cmd/rslint", | |
| "build:debug": "GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/ ../../cmd/rslint ", | |
| "build:bin": "if [ \"$(uname -s | grep -i 'mingw\\|cygwin\\|msys')\" ]; then go build -v -o bin/rslint.exe ../../cmd/rslint; else go build -v -o bin/rslint ../../cmd/rslint; fi", | |
| "build:debug": "if [ \"$(uname -s | grep -i 'mingw\\|cygwin\\|msys')\" ]; then GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/rslint.exe ../../cmd/rslint; else GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/rslint ../../cmd/rslint; fi", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
\"bin/rslint$(go env GOEXE)\"have compatible problems in windows and go compiler will auto add .exe for bin in windows if we don't specify bin name