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: go mod vendor looking for AUTHORS in root #31524

Closed
masterada opened this issue Apr 17, 2019 · 6 comments
Closed

cmd/go: go mod vendor looking for AUTHORS in root #31524

masterada opened this issue Apr 17, 2019 · 6 comments
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@masterada
Copy link

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

$ go version
go version go1.12.4 windows/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

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\adam.kiss\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\go\workspace
set GOPROXY=
set GORACE=
set GOROOT=C:\go
set GOTMPDIR=
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\dev\dliver-webrtc-server\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADAM~1.KIS\AppData\Local\Temp\go-build216719358=/tmp/go-build -gno-record-gcc-switches

What did you do?

$ go mod vendor

What did you expect to see?

successfully creating vendor directory with dependencies

What did you see instead?

go mod vendor: open C:\AUTHORS: Access is denied.
@thepudds thepudds changed the title go mod vendor looking for AUTHORS in root cmd/go: go mod vendor looking for AUTHORS in root Apr 17, 2019
@thepudds
Copy link
Contributor

@masterada A quick test just now did not reproduce this using go1.12.4.

Do you happen to have a public repository where this is reproducible?

Alternatively, would you be able to supply a more complete set of steps to reproduce from scratch? For example, if you start with go mod init testmod and then create a simple main.go with some statements like import _ "github.com/some/repo" or similar, are you able to reproduce this problem?

@thepudds thepudds added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 17, 2019
@masterada
Copy link
Author

Seems like the issue only appeary if GOPATH is a direct child of GOROOT, eg:

GOROOT="C:\go"
GOPATH="C:\go\workspace"

Any other setup (GOPATH="C:\workspace", GOPATH="C:\go\test\workspace") did not reproduce the bug. Here is a project for reproducing it: https://github.com/masterada/go-mod-vendor-test

Not sure if it's reproducible on other OS.

I can live with moving my GOPATH, altough it's a bit painful.

@alexbrainman
Copy link
Member

Seems like the issue only appeary if GOPATH is a direct child of GOROOT

I am pretty sure that is not supported.

Mind you, the error message of

go mod vendor: open C:\AUTHORS: Access is denied.

is not very helpful.

Alex

@agnivade
Copy link
Contributor

@masterada - Putting GOPATH under GOROOT is definitely something not recommended as is evident from here - https://golang.org/doc/code.html#GOPATH.

I would request you to move GOPATH to somewhere else.

Is there anything else you want to be done in this issue ?

@agnivade agnivade added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jun 19, 2019
@masterada
Copy link
Author

I have long moved GOPATH since then, and it works fine. A better error message would be helpful, but otherwise it's working as expected.

@agnivade
Copy link
Contributor

Thanks. Please feel free to open a separate issue for the error message. I will close this.

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

No branches or pull requests

5 participants