fix(tool): preserve Windows drive-letter GOPATH entries - #1994
Open
dajiaohuang wants to merge 2 commits into
Open
fix(tool): preserve Windows drive-letter GOPATH entries#1994dajiaohuang wants to merge 2 commits into
dajiaohuang wants to merge 2 commits into
Conversation
Member
|
@dajiaohuang Please sign CLA |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #1994 +/- ##
===========================================
- Coverage 62.95% 51.91% -11.04%
===========================================
Files 394 334 -60
Lines 30267 23438 -6829
===========================================
- Hits 19056 12169 -6887
- Misses 9924 9936 +12
- Partials 1287 1333 +46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What type of PR is this?
fix
Check the PR title.
<type>(optional scope): <description>(Optional) Translate the PR title into Chinese.
fix(tool): 保留 Windows GOPATH 条目中的盘符路径
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
GetGOPATHcurrently splits an explicitly configured GOPATH with a hard-coded colon. On Windows, that truncates a drive-letter path such asC:\Users\example\gotoC.This change uses
filepath.SplitList, which follows the host platform's path-list separator, and updatesTestGetGOPATHto cover both multiple entries and Windows drive letters. It also makes the existingTestArguments_refGoSrcPathregression pass on Windows.Validation:
go test ./tool/internal_pkg/util ./tool/cmd/kitex/args -count=1go vet ./tool/internal_pkg/util ./tool/cmd/kitex/argsgo test -run=^$ ./...go build ./...golangci-lint run ./tool/internal_pkg/util ./tool/cmd/kitex/args --new-from-rev=origin/main(0 new issues)(Optional) Which issue(s) this PR fixes:
Fixes #1993
(optional) The PR that updates user documentation:
Not applicable; no user-facing workflow or option changes.