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

Open
masterada opened this issue Apr 17, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@masterada
Copy link

commented Apr 17, 2019

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 added the modules label Apr 17, 2019

@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

This comment has been minimized.

Copy link

commented Apr 17, 2019

@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?

@masterada

This comment has been minimized.

Copy link
Author

commented Apr 18, 2019

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

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.