From 1ee0d0e18b5c8a71a0cd9447e06c12e4a1d755d9 Mon Sep 17 00:00:00 2001 From: Alfredo Beaumont Date: Tue, 19 Sep 2017 14:36:06 +0200 Subject: [PATCH] Upgrade to support SDKv1 --- .travis.yml | 2 +- Makefile | 2 +- README.md | 10 +++++----- _example/main.go | 2 +- client.go | 2 +- doc.go | 2 +- libuast.go | 2 +- parse_request.go | 2 +- parse_request_test.go | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 65942fc..91ec3ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: go go: - 1.9 -go_import_path: gopkg.in/bblfsh/client-go.v0 +go_import_path: gopkg.in/bblfsh/client-go.v1 sudo: required diff --git a/Makefile b/Makefile index 059f9db..58c4bce 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Package configuration PROJECT = client-go -LIBUAST_VERSION=0.2.0 +LIBUAST_VERSION=1.0.0 # Including ci Makefile MAKEFILE = Makefile.main diff --git a/README.md b/README.md index bc0bac3..bc0fa71 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# client-go [![GoDoc](https://godoc.org/gopkg.in/bblfsh/client-go.v0?status.svg)](https://godoc.org/gopkg.in/bblfsh/client-go.v0) [![Build Status](https://travis-ci.org/bblfsh/client-go.svg?branch=master)](https://travis-ci.org/bblfsh/client-go) [![codecov](https://codecov.io/gh/bblfsh/client-go/branch/master/graph/badge.svg)](https://codecov.io/gh/bblfsh/client-go) +# client-go [![GoDoc](https://godoc.org/gopkg.in/bblfsh/client-go.v1?status.svg)](https://godoc.org/gopkg.in/bblfsh/client-go.v1) [![Build Status](https://travis-ci.org/bblfsh/client-go.svg?branch=master)](https://travis-ci.org/bblfsh/client-go) [![codecov](https://codecov.io/gh/bblfsh/client-go/branch/master/graph/badge.svg)](https://codecov.io/gh/bblfsh/client-go) [Babelfish](https://doc.bblf.sh) Go client library provides functionality to both connect to the Babelfish server to parse code @@ -10,8 +10,8 @@ and to analyse UASTs with the functionality provided by [libuast](https://github The recommended way to install *client-go* is: ``` -go get -u gopkg.in/bblfsh/client-go.v0/... -cd $GOPATH/src/gopkg.in/bblfsh/client-go.v0 +go get -u gopkg.in/bblfsh/client-go.v1/... +cd $GOPATH/src/gopkg.in/bblfsh/client-go.v1 make dependencies ``` @@ -49,7 +49,7 @@ Module { . Roles: File . Children: { . . 0: Import { -. . . Roles: ImportDeclaration,Statement +. . . Roles: Statement,Declaration,Import . . . StartPosition: { . . . . Offset: 0 . . . . Line: 1 @@ -60,7 +60,7 @@ Module { . . . } . . . Children: { . . . . 0: alias { -. . . . . Roles: ImportPath,SimpleIdentifier +. . . . . Roles: Import,Pathname,Identifier . . . . . TOKEN "foo" . . . . . Properties: { . . . . . . asname: diff --git a/_example/main.go b/_example/main.go index 1374ac6..5faa985 100644 --- a/_example/main.go +++ b/_example/main.go @@ -4,7 +4,7 @@ import ( "flag" "fmt" - "gopkg.in/bblfsh/client-go.v0" + "gopkg.in/bblfsh/client-go.v1" ) var endpoint = flag.String("e", "localhost:9432", "endpoint of the babelfish server") diff --git a/client.go b/client.go index 9344070..2226cec 100644 --- a/client.go +++ b/client.go @@ -3,7 +3,7 @@ package bblfsh import ( "time" - "gopkg.in/bblfsh/sdk.v0/protocol" + "gopkg.in/bblfsh/sdk.v1/protocol" "google.golang.org/grpc" ) diff --git a/doc.go b/doc.go index 4feb41b..fd0aeab 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 Babelfish server to parse code (obtaining an UAST as a // result) and to analyse UASTs with the functionality provided by libuast. -package bblfsh // import "gopkg.in/bblfsh/client-go.v0" +package bblfsh // import "gopkg.in/bblfsh/client-go.v1" diff --git a/libuast.go b/libuast.go index aafeecc..a637de6 100644 --- a/libuast.go +++ b/libuast.go @@ -6,7 +6,7 @@ import ( "sync" "unsafe" - "gopkg.in/bblfsh/sdk.v0/uast" + "gopkg.in/bblfsh/sdk.v1/uast" ) // #cgo CFLAGS: -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/include/libxml2 -std=c99 diff --git a/parse_request.go b/parse_request.go index 2c9bfa7..873677a 100644 --- a/parse_request.go +++ b/parse_request.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "path" - "gopkg.in/bblfsh/sdk.v0/protocol" + "gopkg.in/bblfsh/sdk.v1/protocol" ) // ParseRequest is a placeholder for the parse requests performed by the library diff --git a/parse_request_test.go b/parse_request_test.go index 3d1b3a0..046ee23 100644 --- a/parse_request_test.go +++ b/parse_request_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "gopkg.in/bblfsh/sdk.v0/protocol" + "gopkg.in/bblfsh/sdk.v1/protocol" ) func TestParseRequestConfiguration(t *testing.T) {