-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed as not planned
Closed as not planned
Copy link
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.13 linux/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 GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOENV="/home/user/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="*.sc-corp.net" GONOSUMDB="*.sc-corp.net" GOOS="linux" GOPATH="/home/user/go" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/user/.local/share/umake/go/go-lang" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/user/.local/share/umake/go/go-lang/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/tmp/trash/go.mod" 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-build372133803=/tmp/go-build -gno-record-gcc-switches"
What did you do?
// go.mod
module mod
go 1.13
require sub v0.0.0-00010101000000-000000000000
// replace allows the reproducer to live entirely on the filesystem.
// This will work with external/real modules too.
replace sub => ./sub
// main.go
package main
import (
_ "sub"
_ "cloud.google.com/go/compute/metadata"
)
func main() {}
// sub/go.mod
module sub
go 1.13
require cloud.google.com/go v0.40.0
// sub/sub.go
package sub
import _ "cloud.google.com/go/compute/metadata"
[user@localhost ~]$ go mod tidy
What did you expect to see?
// go.mod
module mod
go 1.13
require (
cloud.google.com/go v0.46.3
sub v0.0.0-00010101000000-000000000000
)
replace sub => ./sub
What did you see instead?
// go.mod
module mod
go 1.13
require (
cloud.google.com/go v0.40.0
sub v0.0.0-00010101000000-000000000000
)
replace sub => ./sub
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules