diff --git a/.travis.yml b/.travis.yml index 59c97dc..3219e3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,14 @@ language: go go_import_path: github.com/bblfsh/go-client env: - - BBLFSHD_VERSION=v2.9.1 BBLFSH_PYTHON_VERSION=v2.3.0 + - BBLFSHD_VERSION=v2.9.1 BBLFSH_PYTHON_VERSION=v2.3.0 GO111MODULE=on install: - | if [[ $TRAVIS_OS_NAME = linux ]]; then docker run --privileged -d -p 9432:9432 --name bblfshd bblfsh/bblfshd:$BBLFSHD_VERSION docker exec bblfshd bblfshctl driver install bblfsh/python-driver:$BBLFSH_PYTHON_VERSION fi - - go get -v -t ./... + - go mod download script: - | @@ -21,7 +21,7 @@ script: jobs: include: - - {go: 1.10.x, os: linux, sudo: required, dist: trusty, services: [docker]} - - {go: 1.11.x, os: linux, sudo: required, dist: trusty, services: [docker]} - - {go: 1.10.x, os: osx, osx_image: xcode9.3} - - {go: 1.11.x, os: osx, osx_image: xcode9.3} + - {go: 1.11.x, os: linux, sudo: required, dist: trusty, services: [docker]} + - {go: 1.12.x, os: linux, sudo: required, dist: trusty, services: [docker]} + - {go: 1.11.x, os: osx, osx_image: xcode9.3} + - {go: 1.12.x, os: osx, osx_image: xcode9.3} diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index ffbd61a..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,222 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/BurntSushi/toml" - packages = ["."] - revision = "b26d9c308763d68093482582cea63d69be07a0f0" - version = "v0.3.0" - -[[projects]] - branch = "master" - name = "github.com/antchfx/xpath" - packages = ["."] - revision = "3de91f3991a1af6e495d49c9218318b5544b20e3" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/gogo/protobuf" - packages = [ - "gogoproto", - "proto", - "protoc-gen-gogo/descriptor", - "sortkeys", - "types" - ] - revision = "636bf0302bc95575d69441b25a2603156ffdddf1" - version = "v1.1.1" - -[[projects]] - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp" - ] - revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/grpc-ecosystem/grpc-opentracing" - packages = ["go/otgrpc"] - revision = "8e809c8a86450a29b90dcc9efbf062d0fe6d9746" - -[[projects]] - name = "github.com/jessevdk/go-flags" - packages = ["."] - revision = "c6ca198ec95c841fdb89fc0de7496fed11ab854e" - version = "v1.4.0" - -[[projects]] - branch = "master" - name = "github.com/mcuadros/go-lookup" - packages = ["."] - revision = "5650f26be7675b629fff8356a50d906fa03e9c8b" - -[[projects]] - name = "github.com/opentracing/opentracing-go" - packages = [ - ".", - "ext", - "log" - ] - revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" - version = "v1.0.2" - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require" - ] - revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" - version = "v1.2.2" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "context", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace" - ] - revision = "f4c29de78a2a91c00474a2e689954305c350adf9" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = ["unix"] - revision = "3dc4335d56c789b04b0ba99b7a37249d9b614314" - -[[projects]] - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable" - ] - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - branch = "master" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - revision = "daca94659cb50e9f37c1b834680f2e46358f10b0" - -[[projects]] - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "codes", - "connectivity", - "credentials", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap" - ] - revision = "32fb0ac620c32ba40a4626ddf94d90d12cce3455" - version = "v1.14.0" - -[[projects]] - name = "gopkg.in/bblfsh/sdk.v1" - packages = [ - "manifest", - "protocol", - "uast" - ] - revision = "94e3b212553e761677da180f321d9a7a60ebec5f" - version = "v1.16.1" - -[[projects]] - name = "gopkg.in/bblfsh/sdk.v2" - packages = [ - "driver", - "driver/errors", - "driver/manifest", - "protocol", - "uast", - "uast/nodes", - "uast/nodes/nodesproto", - "uast/nodes/nodesproto/pio", - "uast/query", - "uast/query/xpath", - "uast/role", - "uast/transformer", - "uast/yaml" - ] - revision = "8953cf36d7332663de6e780d8f0e9ae179199d63" - version = "v2.16.3" - -[[projects]] - name = "gopkg.in/src-d/go-errors.v1" - packages = ["."] - revision = "8bbbeeb767dfdd053b9b45d5a16a4f4ce2c6f694" - version = "v1.0.0" - -[[projects]] - name = "gopkg.in/yaml.v2" - packages = ["."] - revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" - version = "v2.2.1" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "a5322876b8c05bea5273884d3083609f385d4bda824d3e04e3b87cad09a37216" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 1691e9b..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,22 +0,0 @@ -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. - -[[constraint]] - name = "github.com/jessevdk/go-flags" - version = "1.4.x" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.x" - -[[constraint]] - name = "google.golang.org/grpc" - version = "1.14.x" - -[[constraint]] - name = "gopkg.in/bblfsh/sdk.v2" - version = "2.16.x" - -[prune] - go-tests = true - unused-packages = true diff --git a/README.md b/README.md index a8a342f..4e3d959 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ and for analysing UASTs with the functionality provided by [libuast](https://git The recommended way to install *go-client* is: ```sh -go get -u github.com/bblfsh/go-client/... +go get -u github.com/bblfsh/go-client/v4/... ``` ## Example @@ -32,8 +32,8 @@ package main import ( "fmt" - "github.com/bblfsh/go-client" - "github.com/bblfsh/go-client/tools" + "github.com/bblfsh/go-client/v4" + "github.com/bblfsh/go-client/v4/tools" "gopkg.in/bblfsh/sdk.v2/uast/nodes" "gopkg.in/bblfsh/sdk.v2/uast/yaml" diff --git a/cmd/bblfsh-cli/main.go b/cmd/bblfsh-cli/main.go index c80d6b4..3e0cdc6 100644 --- a/cmd/bblfsh-cli/main.go +++ b/cmd/bblfsh-cli/main.go @@ -19,8 +19,8 @@ import ( "github.com/jessevdk/go-flags" - "github.com/bblfsh/go-client" - "github.com/bblfsh/go-client/tools" + "github.com/bblfsh/go-client/v4" + "github.com/bblfsh/go-client/v4/tools" "gopkg.in/bblfsh/sdk.v2/uast/nodes" "gopkg.in/bblfsh/sdk.v2/uast/nodes/nodesproto" "gopkg.in/bblfsh/sdk.v2/uast/yaml" diff --git a/doc.go b/doc.go index c1a0eca..40bc2e7 100644 --- a/doc.go +++ b/doc.go @@ -1,4 +1,4 @@ // Babelfish (https://doc.bblf.sh) Go client library provides functionality to // both connect to the bblfsh daemon to parse code (obtaining an UAST as a // result) and to analyse UASTs with the functionality provided by libuast. -package bblfsh // import "github.com/bblfsh/go-client" +package bblfsh diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5467cc7 --- /dev/null +++ b/go.mod @@ -0,0 +1,27 @@ +module github.com/bblfsh/go-client/v4 + +require ( + github.com/BurntSushi/toml v0.3.0 // indirect + github.com/antchfx/xpath v0.0.0-20180922041825-3de91f3991a1 // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/gogo/protobuf v1.1.1 // indirect + github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/golang/protobuf v1.1.0 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/jessevdk/go-flags v1.4.0 + github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 // indirect + github.com/opentracing/opentracing-go v1.0.2 // indirect + github.com/pkg/errors v0.8.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 + golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a // indirect + golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 // indirect + golang.org/x/sys v0.0.0-20180801221139-3dc4335d56c7 // indirect + golang.org/x/text v0.3.0 // indirect + google.golang.org/genproto v0.0.0-20180731170733-daca94659cb5 // indirect + google.golang.org/grpc v1.14.0 + gopkg.in/bblfsh/sdk.v1 v1.16.1 + gopkg.in/bblfsh/sdk.v2 v2.16.3 + gopkg.in/src-d/go-errors.v1 v1.0.0 // indirect + gopkg.in/yaml.v2 v2.2.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..18cb729 --- /dev/null +++ b/go.sum @@ -0,0 +1,48 @@ +github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY= +github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +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/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +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/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +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/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a h1:8fCF9zjAir2SP3N+axz9xs+0r4V8dqPzqsWO10t8zoo= +golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180801221139-3dc4335d56c7 h1:tr8zzCvQ7aQaYQ5nOInKN9jN9ujD92ktUtiEpN/b+tE= +golang.org/x/sys v0.0.0-20180801221139-3dc4335d56c7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/genproto v0.0.0-20180731170733-daca94659cb5 h1:2PjFmwzH/sxgW9CRJDlEiwMHO8rOk1eMDzVL14HC1e4= +google.golang.org/genproto v0.0.0-20180731170733-daca94659cb5/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +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.16.3 h1:iUfXzMWdtVv96CSy3RcVkWSWwYbCZ3OJl5b4guZ0z7o= +gopkg.in/bblfsh/sdk.v2 v2.16.3/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=