-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: '%' character in module path rejected in 'go mod init' #41540
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
Comments
The accepted syntax for module paths is documented here. The |
This is working as designed. Is there some reason that paths of this form cannot be avoided for your use-case? (CC @jayconrod @matloob) |
There are spaces in the url paths to the azure dev ops repository.
From: Bryan C. Mills <[email protected]>
Sent: Monday, September 21, 2020 8:35 PM
To: golang/go <[email protected]>
Cc: Lonnie Herring <[email protected]>; Author <[email protected]>
Subject: Re: [golang/go] cmd/go: '%' character in module path rejected in 'go mod init' (#41540)
This is working as designed. Is there some reason that paths of this form cannot be avoided for your use-case?
(CC @jayconrod<https://github.com/jayconrod> @matloob<https://github.com/matloob>)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#41540 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGQLOKWQSM6A46OH6VUEAXTSG75LDANCNFSM4RVB56XA>.
|
I have the exact same issue, no idea what to name my module now. Renaming the VCS' path is not trivial. I'd say there's no ambiguity, a |
Any progress on this issue? It still same in version 1.18. |
This is working as designed. Design changes to the set of allowed module paths should go through the Go proposal process. |
I also have this issue. The docs recommend using the location where your package can be referenced as the name for your package but don't allow all urls to be used. We are using Azure devops and there is no chance of changing the project names that make up the urls to our repos. |
The restrictions seem to be too tight for git mod can we loosen them. I have seen other issues posted with other characters but not the % for instance ".:;/.." etc
The path to my repo has a space in it.
$ go version
go version go1.15.2 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?Ubuntu 18.04
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/.../.cache/go-build"
GOENV="/home/.../.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/.../go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/../go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build831607011=/tmp/go-build -gno-record-gcc-switches"
What did you do?
go mod init dev.azure.com/some%20folder
What did you expect to see?
create the go.mod file
What did you see instead?
go: malformed import path "dev.azure.com/some%20folder": invalid char '%'
The text was updated successfully, but these errors were encountered: