Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/micellis/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/micellis/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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=/var/folders/5n/cs1hx8q170v2741s2whxhc10pnl463/T/go-build108446644=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
go get example.com/foo/bar@v1.0.0+meta.sha256
Note the build metadata is not ignored when attempting to retrieve the info file.
What did you expect to see?
go: finding example.com/foo/bar v1.0.0 go: finding example.com/foo v1.0.0 go: finding example.com v1.0.0 go get example.com/foo/bar@v1.0.0+meta: unexpected status (http://localhost:8000/example.com/foo/bar/@v/v1.0.0.info): 404 File not found
What did you see instead?
go: finding example.com/foo/bar v1.0.0+meta.sha256 go: finding example.com/foo v1.0.0+meta.sha256 go: finding example.com v1.0.0+meta.sha256 go get example.com/foo/bar@v1.0.0+meta.sha256: unexpected status (http://localhost:8000/example.com/foo/bar/@v/v1.0.0+meta.sha256.info): 404 File not found
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
mellis commentedon Nov 7, 2018
The issue is due to the
internal/semver/semver.go
package not recognizing the separator character '.' in theparseBuild
function.Have a small fix, just want to confirm this isn't expected (doesn't appear to be looking at the function and similar function
parsePrerelease
)gopherbot commentedon Nov 12, 2018
Change https://golang.org/cl/148835 mentions this issue:
cmd/go: Fix parsing multiple build metadata
cmd/go: parse dot-separated identifiers in build metadata
thepudds commentedon May 14, 2019
@mellis The behavior here changed again recently in #31713.
It would be interesting to hear if you now see behavior that works for you if try tip. (An easy way to get tip is
go get golang.org/dl/gotip && gotip download
).Also, did you have an example of a public repository where this was a problem, or was it a private repo where you first saw this as a problem?
mellis commentedon May 14, 2019
I originally noticed the behaviour when experimenting with module support for our internal repositories and build system.
We've changed strategies since then though, so this particular issue isn't affecting us any more.