Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
switch to go modules
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <[email protected]>
  • Loading branch information
Denys Smirnov authored and dennwc committed Apr 18, 2019
1 parent 78cbf45 commit 1d67372
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 104 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
Expand All @@ -46,3 +42,4 @@ testing_exec
example1
build/
tests/Makefile
vendor/
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
language: go

go:
- '1.11'
- '1.12.x'

compiler:
- gcc
os:
- linux
- osx

env:
- GO111MODULE=on

before_install:
- if [[ $TRAVIS_OS_NAME = linux ]]; then sudo apt-get update -y && sudo apt-get install -y libcunit1 libcunit1-doc libcunit1-dev gcc-mingw-w64-x86-64; fi
- if [[ $TRAVIS_OS_NAME = osx ]]; then brew install cunit lcov ; fi
- mkdir -p $GOPATH/bin && curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

script:
- make vendor
- make package-all
- ls -l ./build
- make test
Expand Down
76 changes: 0 additions & 76 deletions Gopkg.lock

This file was deleted.

10 changes: 0 additions & 10 deletions Gopkg.toml

This file was deleted.

6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ HOSTOS:=$(shell go env GOHOSTOS)

SRC_DIR=./src
DEPS_C = $(SRC_DIR)/*.h $(SRC_DIR)/*.hpp $(SRC_DIR)/*.c
DEPS_GO = $(SRC_DIR)/*.go gen_header.go vendor
DEPS_GO = $(SRC_DIR)/*.go gen_header.go go.mod go.sum

BUILD_MODE=-buildmode=c-shared
BUILD_MODE_STATIC=-buildmode=c-archive
Expand Down Expand Up @@ -50,10 +50,6 @@ build-all: build-darwin

endif

.PHONY: vendor
vendor: Gopkg.*
dep ensure --vendor-only

build-linux: $(DEPS_C) $(DEPS_GO)
mkdir -p $(OUT_LINUX) && \
GOOS=linux GOARCH=amd64 $(GO_BUILD) $(BUILD_MODE) -o=$(OUT_LINUX)/$(OUT_NAME).so $(SRC_DIR)/ && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Check [releases](https://github.com/bblfsh/libuast/releases) for precompiled bin
### Dependencies

**Dependencies:**
- Go >= 1.11
- Go 1.12+
- gcc (for cgo)
- libcunit1 (optional, for tests)

Expand Down
7 changes: 2 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ clone_folder: c:\gopath\src\github.com\bblfsh\libuast

environment:
GOPATH: c:\gopath
GOVERSION: "1.11"
DEPVERSION: "0.4.1"
GOVERSION: "1.12.4"
GO111MODULE: "on"
PREFIX: c:\opt
CYG_ROOT: C:\cygwin64
VS150COMNTOOLS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools"
Expand All @@ -33,9 +33,6 @@ install:
- set PATH=c:\go\bin;c:\gopath\bin;%PATH%
- go version
- go env
# Install Go dep
- mkdir c:\gopath\bin
- curl -o c:\gopath\bin\dep.exe -L https://github.com/golang/dep/releases/download/v%DEPVERSION%/dep-windows-amd64.exe
# Use preinstalled mingw 6.3.0, note that using 7.3.0 causes problems with
# the compiled libraries when linking against them, at least when cross-compiling
# from older GCC. Test these scenarios if you consider upgrading mingw here.
Expand Down
17 changes: 17 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module github.com/bblfsh/libuast

go 1.12

require (
github.com/antchfx/xpath v0.0.0-20180922041825-3de91f3991a1 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/protobuf v1.2.0 // indirect
github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 // indirect
github.com/pkg/errors v0.8.0 // indirect
github.com/stretchr/testify v1.3.0 // indirect
golang.org/x/sync v0.0.0-20190412183630-56d357773e84 // indirect
gopkg.in/bblfsh/sdk.v1 v1.16.1
gopkg.in/bblfsh/sdk.v2 v2.2.2
gopkg.in/src-d/go-errors.v1 v1.0.0 // indirect
gopkg.in/yaml.v2 v2.2.1 // indirect
)
29 changes: 29 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
github.com/antchfx/xpath v0.0.0-20180922041825-3de91f3991a1 h1:nt4RMjvM9pJ5HR7WkCeAnDz1pgHbLT2vxICalUTWcJU=
github.com/antchfx/xpath v0.0.0-20180922041825-3de91f3991a1/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 h1:BrhJNdEFWGuiJk/3/SwsG5Rex3zjFxYsDi2bpd7382Y=
github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767/go.mod h1:ct+byCpkFokm4J0tiuAvB8cf2ttm6GcCe89Yr25nGKg=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/sync v0.0.0-20190412183630-56d357773e84 h1:IqXQ59gzdXv58Jmm2xn0tSOR9i6HqroaOFRQ3wR/dJQ=
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
gopkg.in/bblfsh/sdk.v1 v1.16.1 h1:knNHijV8DddakjzTVNThC+VY7KprdIaMkE3+J/p0bT0=
gopkg.in/bblfsh/sdk.v1 v1.16.1/go.mod h1:C50G07MDlG8LaS4El1h/G7fjz8Ho9VNmH68Dt3cVVnQ=
gopkg.in/bblfsh/sdk.v2 v2.2.2 h1:lk/tcAQMy7a0PKqdAIGJZLrD4FHUGP2jkh0qBF2hbbs=
gopkg.in/bblfsh/sdk.v2 v2.2.2/go.mod h1:H/uxybs1j7MNuEEoiht9VzYkuQ7aUUjTtEUBtKfeUkM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/src-d/go-errors.v1 v1.0.0 h1:cooGdZnCjYbeS1zb1s6pVAAimTdKceRrpn7aKOnNIfc=
gopkg.in/src-d/go-errors.v1 v1.0.0/go.mod h1:q1cBlomlw2FnDBDNGlnh6X0jPihy+QxZfMMNxPCbdYg=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit 1d67372

Please sign in to comment.