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 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
Member

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 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 as completed Jul 27, 2020
@golang golang locked and limited conversation to collaborators Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants