Navigation Menu

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

cmd/go: multiple go-import meta tags incorrectly handled as of CL 120042 #26200

Closed
myitcv opened this issue Jul 3, 2018 · 1 comment
Closed
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented Jul 3, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10.3 linux/amd64
vgo commit 97ff4ad34612eed56f1dc6c6aaee19617e45e2be

Does this issue reproduce with the latest release?

Per details above.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build414598848=/tmp/go-build -gno-record-gcc-switches"

What did you do?

cd `mktemp -d`
export GOPATH=$PWD
mkdir hello
cd hello
echo "package main" > main.go
vgo mod -init -module example.com/hello
vgo get myitcv.io/blah2

Context is:

$ curl -s -i https://myitcv.io/blah2?go-get=1 | grep meta
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="go-import" content="myitcv.io git https://github.com/myitcv/x">
        <meta name="go-import" content="myitcv.io/blah2 mod https://raw.githubusercontent.com/myitcv/pubx/master">
        <meta name="go-source" content="myitcv.io https://github.com/myitcv/x/wiki https://github.com/myitcv/x/tree/master{/dir} https://github.com/myitcv/x/blob/master{/dir}/{file}#L{line}">
        <meta http-equiv="refresh" content="0; url=https://godoc.org/myitcv.io/blah2">

What did you expect to see?

Successful find and download.

What did you see instead?

vgo get myitcv.io/blah2: unrecognized import path "myitcv.io/blah2" (parse https://myitcv.io/blah2?go-get=1: multiple meta tags match import path "myitcv.io/blah2")

This seems to be a regression as of https://go-review.googlesource.com/120042

/cc @rsc @bcmills

@gopherbot gopherbot added this to the vgo milestone Jul 3, 2018
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 4, 2018
@rsc rsc modified the milestones: vgo, Go1.11 Jul 12, 2018
@rsc rsc added the modules label Jul 12, 2018
@rsc rsc changed the title x/vgo: multiple go-import meta tags incorrectly handled as of CL 120042 cmd/go: multiple go-import meta tags incorrectly handled as of CL 120042 Jul 12, 2018
@gopherbot
Copy link

Change https://golang.org/cl/124714 mentions this issue: cmd/go/internal/get: fix "mod over non-mod" preference for meta tags

@golang golang locked and limited conversation to collaborators Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants