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: mod vendor should ignore non-Go content #44119

Open
reitzig opened this issue Feb 5, 2021 · 4 comments
Open

cmd/go: mod vendor should ignore non-Go content #44119

reitzig opened this issue Feb 5, 2021 · 4 comments

Comments

@reitzig
Copy link

@reitzig reitzig commented Feb 5, 2021

Tl;dr: Go is not the only tool I use in my project; I expect it share vendor peacefully.

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

$ go version
go version go1.15.8 linux/amd64

(latest at the time of this writing)

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/raphael/.cache/go-build"
GOENV="/home/raphael/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/raphael/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/raphael/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/raphael/Code/tools/container-do/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-build500284300=/tmp/go-build -gno-record-gcc-switches"

What did you do?

# Gemfile
source "https://rubygems.org"

group :test do
  gem 'cucumber', '~> 5'
  gem 'rspec', '~> 3'
end
# go.mod
module github.com/reitzig/container-do

go 1.15

require (
	github.com/pelletier/go-toml v1.8.1
	go.uber.org/zap v1.16.0
)
bundle2.7 config set --local path 'vendor/bundle'
bundle2.7 install
go mod vendor

What did you expect to see?

Ruby gems and Go modules "installed" in vendor.

What did you see instead?

Only Go modules in vendor.

Workaround

Bundler leaves Go modules alone, so re-running bundle install after go mod vendor creates the desired state.

@mvdan
Copy link
Member

@mvdan mvdan commented Feb 5, 2021

This seems like a duplicate of #26366.

@reitzig
Copy link
Author

@reitzig reitzig commented Feb 5, 2021

Very old and unsolved, but yes, essentially the same issue. Don't know if, after all this time, it refers to the same implementation anymore.

@bcmills
Copy link
Member

@bcmills bcmills commented Feb 5, 2021

Is there a typo in the issue title? I'm having trouble figuring out what the desired behavior is here.

@reitzig
Copy link
Author

@reitzig reitzig commented Feb 8, 2021

Is there a typo in the issue title?

I don't think so. What's your understanding of the expected behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants