Skip to content

Commit

Permalink
Use Go 1.11 Module instead of Glide to manage the vendor directory (p…
Browse files Browse the repository at this point in the history
…ingcap#62)

* vendor: migrate to Go 1.11 module instead of glide

* vendor: update vendor

`go mod` refuses to download the earlier versions of "golang.org/x/net"
and "golang.org/x/text", which is why the diff is so large.
  • Loading branch information
kennytm authored Sep 6, 2018
1 parent 47b2ace commit ddbb5e3
Show file tree
Hide file tree
Showing 78 changed files with 18,057 additions and 6,227 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ test_*/
*.tar.gz
.idea
*.local
go.sum
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(path_to_add):$(PATH)

GO := go
GOBUILD := CGO_ENABLED=0 $(GO) build
GOTEST := CGO_ENABLED=1 $(GO) test -p 3
GOBUILD := GO111MODULE=off CGO_ENABLED=0 $(GO) build
GOTEST := GO111MODULE=off CGO_ENABLED=1 $(GO) test -p 3

ARCH := "`uname -s`"
LINUX := "Linux"
Expand Down Expand Up @@ -51,8 +51,13 @@ checksuccess:
echo "Lightning build successfully :-) !" ; \
fi

goyacc:
$(GOBUILD) -o $(TIDBDIR)/bin/goyacc $(TIDBDIR)/parser/goyacc/main.go
# FIXME: move this to pingcap/goyacc so we could `go get` it instead?
$(TIDBDIR)/bin/goyacc:
mkdir -p $(TIDBDIR)/bin
curl -f -L -o $(TIDBDIR)/bin/main.go https://raw.githubusercontent.com/pingcap/tidb/master/parser/goyacc/main.go
$(GOBUILD) -o $(TIDBDIR)/bin/goyacc $(TIDBDIR)/bin/main.go

goyacc: $(TIDBDIR)/bin/goyacc

parser: goyacc
$(TIDBDIR)/bin/goyacc -o /dev/null $(TIDBDIR)/parser/parser.y
Expand Down Expand Up @@ -84,14 +89,9 @@ integration_test:

update: update_vendor parser clean_vendor
update_vendor:
@which glide >/dev/null || curl https://glide.sh/get | sh
@which glide-vc || go get -v github.com/sgotti/glide-vc
ifdef PKG
@glide get -v ${PKG}
else
@glide update -v
endif
rm -rf vendor/
GO111MODULE=on go mod verify
GO111MODULE=on go mod vendor

clean_vendor:
@echo "removing test files"
@glide vc --use-lock-file --only-code --no-tests
hack/clean_vendor.sh
308 changes: 0 additions & 308 deletions glide.lock

This file was deleted.

Loading

0 comments on commit ddbb5e3

Please sign in to comment.