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

go mod download : no congruence between command result and help description #41982

Closed
jaun-rg opened this issue Oct 14, 2020 · 4 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@jaun-rg
Copy link

jaun-rg commented Oct 14, 2020

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

$ go version
go version go1.15

Does this issue reproduce with the latest release?

generate the follow project:

.
├── go.mod
├── go.sum
└── main.go

go.mod generate with go mod init project/test and install dependencies with go get google.golang.org/grpc

module project/test

go 1.15

require (
	google.golang.org/grpc v1.33.0
)

go mod download (with an existent go.mod and main.go)
and
go help mod download

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

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/${user}/Library/Caches/go-build"
GOENV="/Users/${user}/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/${user}/go-workspace/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/${user}/go-workspace"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
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/tk/v867zc1j74

What did you do?

When running the command go mod download in directory with a go.mod and main.go files, this command return

go mod download: no modules specified (see 'go help mod download')

What did you expect to see?

According to go help mod download:

"... With no arguments, download applies to all dependencies of the main module (equivalent to 'go mod download all'). ..."

using the command go mod download all the dependencies are installed as expected

@seankhliao
Copy link
Member

Your env indicates you are not in a module

@jaun-rg
Copy link
Author

jaun-rg commented Oct 15, 2020

I understand your comment, but the project was generated with go mod init ...

@bcmills
Copy link
Contributor

bcmills commented Oct 15, 2020

I'm not able to reproduce the reported behavior with the steps described. Please provide the exact sequence of commands for which you observed the problem.

test$ go version
go version go1.15.3 linux/amd64

test$ go mod init project/test
go: creating new go.mod: module project/test

test$ cat > main.go
package main

func main() {}

test$ go get -d google.golang.org/grpc
go: downloading google.golang.org/grpc v1.33.0
go: google.golang.org/grpc upgrade => v1.33.0
go: downloading golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading github.com/golang/protobuf v1.3.3
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading golang.org/x/text v0.3.0

test$ go mod download

test$

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 15, 2020
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants