Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Replace pre-go1.11 vendoring with a go1.11 module. #37

Merged
merged 3 commits into from
Aug 29, 2019

Conversation

brb-g
Copy link
Contributor

@brb-g brb-g commented Aug 28, 2019

No description provided.

@brb-g brb-g requested a review from fvoznika August 28, 2019 20:45
@fvoznika fvoznika requested a review from Random-Liu August 29, 2019 17:13
fvoznika
fvoznika previously approved these changes Aug 29, 2019
Copy link
Member

@fvoznika fvoznika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait for Lantao to approve too.

@Random-Liu
Copy link
Member

Random-Liu commented Aug 29, 2019

Hm, after this change, how is this expected to be built?

go build doesn't work without the vendors. @brb-g

@brb-g
Copy link
Contributor Author

brb-g commented Aug 29, 2019

I'm fixing up the travis build now -- I think it's broken because the Travis config specifies go 1.11 but the go.mod file specifies go 1.12. On my machine, make looks like:

brb@brb-gdesktop:~/gvisor-containerd-shim $ make
CGO_ENABLED=0 go build  -o bin/gvisor-containerd-shim   ./cmd/gvisor-containerd-shim
go: finding github.com/containerd/ttrpc v0.0.0-20190411181408-699c4e40d1e7
go: finding github.com/containerd/cri v0.0.0-20190308093238-8a0bd84b9a4c
go: finding github.com/golang/protobuf v1.1.0
go: finding github.com/docker/go-units v0.3.1
go: finding github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55
go: finding github.com/Microsoft/go-winio v0.4.14
go: finding github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02
go: finding github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b
go: finding github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3
go: finding golang.org/x/net v0.0.0-20170716174642-b3756b4b77d7
go: finding github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd
go: finding github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1
go: finding github.com/containerd/containerd v0.0.0-20190510190154-d0319ec44af6
go: finding github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470
go: finding github.com/containerd/cgroups v0.0.0-20190328223300-4994991857f9
go: finding google.golang.org/grpc v1.12.0
go: finding github.com/Microsoft/hcsshim v0.8.6
go: finding github.com/google/go-cmp v0.3.1
go: finding github.com/opencontainers/runc v1.0.0-rc8
go: finding github.com/gogo/protobuf v1.0.0
go: finding github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2
go: finding github.com/pkg/errors v0.8.1
go: finding gotest.tools v2.2.0+incompatible
go: finding golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b
go: finding github.com/sirupsen/logrus v1.4.1
go: finding github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260
go: finding google.golang.org/genproto v0.0.0-20170523043604-d80a6e20e776
go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: finding github.com/BurntSushi/toml v0.3.0
go: finding golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33
go: finding github.com/stretchr/objx v0.1.1
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/pmezard/go-difflib v1.0.0
CGO_ENABLED=0 go build  -o bin/containerd-shim-runsc-v1   ./cmd/containerd-shim-runsc-v1
brb@brb-gdesktop:~/gvisor-containerd-shim $ ls bin/gvisor-containerd-shim 
bin/gvisor-containerd-shim

See https://github.com/golang/go/wiki/Modules.

@Random-Liu
Copy link
Member

@brb-g Sounds good.

Fixing build and good to go. :)

@ianlewis
Copy link

@brb-g I think you need to add GO111MODULE=on to the env because travis puts the source under the GOPATH. If source is under GOPATH then go will not download dependencies when running 'go build'

Copy link

@ianlewis ianlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ianlewis ianlewis merged commit 9ce9cea into google:master Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants