Skip to content
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

package path mistranslating Capture word to "!<Cap>" under $GOPATH/pkg/mod #40424

Closed
ewagmig opened this issue Jul 27, 2020 · 2 comments
Closed

Comments

@ewagmig
Copy link

@ewagmig ewagmig commented Jul 27, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.5 darwin/amd64

Does this issue reproduce with the latest release?

This issue is under the version of go1.14.5

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/usr/local/go/bin"
GOCACHE="/Users/ewagmig/Library/Caches/go-build"
GOENV="/Users/ewagmig/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"

What did you do?

I have opened the gomodule mode with GO111MODULE="on", trying to download the packages in the $GOPATH/pkg/mod.
Specifically, the remote repos mixed Capture and Lower case of words in it.

What did you expect to see?

We expect to see the package with the exact same pattern of the remote repos. e.g. gitlab.you.com/AblockTime/BigData

What did you see instead?

Instead in the $GOPATH/pkg/mod, it is shown as gitlab.you.com/!ablock!time/!big!data, every Cap word in the path has been translated as ! + <lower_case word>

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jul 27, 2020

To avoid ambiguity when serving from case-insensitive file systems, the $module and $version elements are case-encoded by replacing every uppercase letter with an exclamation mark followed by the corresponding lower-case letter. This allows modules example.com/M and example.com/m to both be stored on disk, since the former is encoded as example.com/!m.

@ALTree
Copy link
Member

@ALTree ALTree commented Jul 27, 2020

As seankhliao noted, this is expected and documented. I'm closing this issue as working as intended.

@ALTree ALTree closed this Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.