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

Commit

Permalink
update to sdk v2
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <denys@sourced.tech>
  • Loading branch information
Denys Smirnov authored and dennwc committed May 3, 2018
1 parent ba28743 commit 6b40ce1
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- docker

before_script:
- go get -v gopkg.in/bblfsh/sdk.v1/...
- go get -v gopkg.in/bblfsh/sdk.v2/...
- bblfsh-sdk prepare-build .
- go get -v -t ./driver/...

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Development Environment

Requirements:
- `docker`
- [`bblfsh-sdk`](https://github.com/bblfsh/sdk) _(go get -u gopkg.in/bblfsh/sdk.v1/...)_
- [`bblfsh-sdk`](https://github.com/bblfsh/sdk) _(go get -u gopkg.in/bblfsh/sdk.v2/...)_
- UAST converter dependencies _(go get -t -v ./...)_

To initialize the build system execute: `bblfsh-sdk prepare-build`, at the root of the project. This will install the SDK at `.sdk` for this driver.
Expand Down
4 changes: 2 additions & 2 deletions driver/fixtures/fixtures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/bblfsh/go-driver/driver/golang"
"github.com/bblfsh/go-driver/driver/normalizer"
"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v1/sdk/driver/fixtures"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/sdk/driver/fixtures"
)

const projectRoot = "../../"
Expand Down
2 changes: 1 addition & 1 deletion driver/gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func main() {
fmt.Fprintln(w, genHeader+`package normalizer
import (
"gopkg.in/bblfsh/sdk.v1/uast/role"
"gopkg.in/bblfsh/sdk.v2/uast/role"
)
var typeRoles = map[string][]role.Role{`)
Expand Down
6 changes: 3 additions & 3 deletions driver/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"go/token"
"reflect"

"gopkg.in/bblfsh/sdk.v1/protocol"
"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v1/uast"
"gopkg.in/bblfsh/sdk.v2/protocol"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/uast"
)

func ParseString(code string) (*ast.File, error) {
Expand Down
6 changes: 3 additions & 3 deletions driver/golang/golang_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/bblfsh/sdk.v1/protocol"
"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v1/uast"
"gopkg.in/bblfsh/sdk.v2/protocol"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/uast"
)

func TestNative(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion driver/impl/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package impl

import (
"github.com/bblfsh/go-driver/driver/golang"
"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
_ "github.com/bblfsh/go-driver/driver/impl"
"github.com/bblfsh/go-driver/driver/normalizer"

"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion driver/normalizer/ann_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions driver/normalizer/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package normalizer
import (
"go/token"

"gopkg.in/bblfsh/sdk.v1/uast"
"gopkg.in/bblfsh/sdk.v1/uast/role"
. "gopkg.in/bblfsh/sdk.v1/uast/transformer"
"gopkg.in/bblfsh/sdk.v1/uast/transformer/positioner"
"gopkg.in/bblfsh/sdk.v2/uast"
"gopkg.in/bblfsh/sdk.v2/uast/role"
. "gopkg.in/bblfsh/sdk.v2/uast/transformer"
"gopkg.in/bblfsh/sdk.v2/uast/transformer/positioner"
)

// Native is the of list `transformer.Transformer` to apply to a native AST.
// To learn more about the Transformers and the available ones take a look to:
// https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/transformer
// https://godoc.org/gopkg.in/bblfsh/sdk.v2/uast/transformer
var Native = Transformers([][]Transformer{
// The main block of transformation rules.
{Mappings(Annotations...)},
Expand All @@ -29,7 +29,7 @@ var Native = Transformers([][]Transformer{
// and can access original source code file. It can be used to improve or
// fix positional information.
//
// https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/transformer/positioner
// https://godoc.org/gopkg.in/bblfsh/sdk.v2/uast/transformer/positioner
var Code = []CodeTransformer{
positioner.NewFillLineColFromOffset(),
}
Expand Down
2 changes: 1 addition & 1 deletion native/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"github.com/bblfsh/go-driver/driver/golang"
"gopkg.in/bblfsh/sdk.v1/sdk/driver"
"gopkg.in/bblfsh/sdk.v2/sdk/driver"
)

func main() {
Expand Down

0 comments on commit 6b40ce1

Please sign in to comment.