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 vendor" cannot copy subdirectories to "vendor" #43317

Closed
drwpeng opened this issue Dec 22, 2020 · 2 comments
Closed

"go mod vendor" cannot copy subdirectories to "vendor" #43317

drwpeng opened this issue Dec 22, 2020 · 2 comments

Comments

@drwpeng
Copy link

drwpeng commented Dec 22, 2020

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

$ go version
1.14.1

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wpeng/.cache/go-build"
GOENV="/home/wpeng/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOOS="linux"
GOPATH=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build297722647=/tmp/go-build -gno-record-gcc-switches"

What did you do?

`
[wpeng@localhost topsec]$ go mod tidy
[wpeng@localhost topsec]$ go mod vendor
[wpeng@localhost topsec]$ make
sh buildav.sh

github.com/gen2brain/go-unarr

vendor/github.com/gen2brain/go-unarr/unarr.go:6:19: fatal error: unarr.h: No such file or directory
#include <unarr.h>
^
compilation terminated.
make: *** [build] Error 2
[wpeng@localhost topsec]$ ll vendor/github.com/gen2brain/go-unarr/
.appveyor.yml .gitignore .goreleaser.yml .travis.yml LICENSE README.md build.sh go.mod unarr.go unarr_cgo.go
[wpeng@localhost topsec]$ ll vendor/github.com/gen2brain/go-unarr/
total 28
-rw-rw-r--. 1 wpeng wpeng 893 Dec 22 16:27 LICENSE
-rw-rw-r--. 1 wpeng wpeng 2613 Dec 22 16:27 README.md
-rw-rw-r--. 1 wpeng wpeng 1449 Dec 22 16:27 build.sh
-rw-rw-r--. 1 wpeng wpeng 46 Dec 22 16:27 go.mod
-rw-rw-r--. 1 wpeng wpeng 5300 Dec 22 16:27 unarr.go
-rw-rw-r--. 1 wpeng wpeng 1910 Dec 22 16:27 unarr_cgo.go
[wpeng@localhost topsec]$ ll ~/gowork/pkg/mod/github.com/gen2brain/go-unarr@v0.1.1/
.appveyor.yml .goreleaser.yml LICENSE build.sh external/ testdata/ unarr_cgo.go
.gitignore .travis.yml README.md cmd/ go.mod unarr.go unarr_test.go
[wpeng@localhost topsec]$ ll ~/gowork/pkg/mod/github.com/gen2brain/go-unarr@v0.1.1/
total 36
-r--r--r--. 1 wpeng wpeng 893 Oct 27 15:42 LICENSE
-r--r--r--. 1 wpeng wpeng 2613 Oct 27 15:42 README.md
-r--r--r--. 1 wpeng wpeng 1449 Oct 27 15:42 build.sh
dr-xr-xr-x. 3 wpeng wpeng 19 Oct 27 15:42 cmd
dr-xr-xr-x. 6 wpeng wpeng 56 Oct 27 15:42 external
-r--r--r--. 1 wpeng wpeng 46 Oct 27 15:42 go.mod
dr-xr-xr-x. 2 wpeng wpeng 120 Oct 27 15:42 testdata
-r--r--r--. 1 wpeng wpeng 5300 Oct 27 15:42 unarr.go
-r--r--r--. 1 wpeng wpeng 1910 Oct 27 15:42 unarr_cgo.go
-r--r--r--. 1 wpeng wpeng 6894 Oct 27 15:42 unarr_test.go
[wpeng@localhost topsec]$

`

What did you expect to see?

After "go mod vendor", go-unarr should all be copied into my vendor directory.

What did you see instead?

Only the files in Go-unarr are copied, and the subdirectories are not included.

@bcmills
Copy link
Contributor

bcmills commented Dec 22, 2020

Duplicate of #26366

@bcmills bcmills marked this as a duplicate of #26366 Dec 22, 2020
@bcmills bcmills closed this as completed Dec 22, 2020
@bcmills
Copy link
Contributor

bcmills commented Dec 22, 2020

See in particular #26366 (comment).

@golang golang locked and limited conversation to collaborators Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants