Skip to content

Commit

Permalink
Move rpcreflect to a dependency
Browse files Browse the repository at this point in the history
The following moves rpcreflect to an external dependency so we can
correctly bring the schemagen generator dependency code in without
it exploding on us.
  • Loading branch information
SimonRichardson committed Aug 7, 2019
1 parent 3bc0d94 commit 90307f6
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 536 deletions.
26 changes: 17 additions & 9 deletions Gopkg.lock

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

10 changes: 7 additions & 3 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@
revision = "4d05e43ad98c1edcf2f52291685bd9bbc12fd2cd"

[[constraint]]
revision = "6c0c47f99db1d6789ea71b126fd6951df11de2c4"
name = "github.com/bcsaller/jsonschema"
source = "github.com/SimonRichardson/jsonschema"
revision = "1cefd32714820322a3b1f1f19157b69e51038fde"
name = "github.com/juju/jsonschema-gen"
source = "github.com/SimonRichardson/jsonschema-gen"

[[constraint]]
revision = "cca922e065df403dc5088294f7f546e838d13708"
name = "github.com/SimonRichardson/rpcreflect"
2 changes: 1 addition & 1 deletion apiserver/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/juju/errors"
"gopkg.in/juju/names.v2"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/api"
"github.com/juju/juju/apiserver/common"
"github.com/juju/juju/apiserver/facade"
Expand All @@ -23,7 +24,6 @@ import (
"github.com/juju/juju/network"
"github.com/juju/juju/permission"
"github.com/juju/juju/rpc"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/juju/state"
statepresence "github.com/juju/juju/state/presence"
jujuversion "github.com/juju/juju/version"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restricted_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package apiserver

import (
"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/rpc"
"github.com/juju/juju/rpc/rpcreflect"
)

// restrictRoot wraps the provided root so that the check function is
Expand Down
2 changes: 1 addition & 1 deletion apiserver/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/juju/errors"
"gopkg.in/juju/names.v2"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver/common"
"github.com/juju/juju/apiserver/facade"
"github.com/juju/juju/apiserver/params"
Expand All @@ -23,7 +24,6 @@ import (
"github.com/juju/juju/feature"
"github.com/juju/juju/permission"
"github.com/juju/juju/rpc"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/juju/state"
)

Expand Down
2 changes: 1 addition & 1 deletion apiserver/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
gc "gopkg.in/check.v1"
"gopkg.in/juju/names.v2"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver"
"github.com/juju/juju/apiserver/facade"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/juju/state"
"github.com/juju/juju/testing"
)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/testing/fakeapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
"github.com/gorilla/websocket"
"github.com/juju/utils"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver/observer"
"github.com/juju/juju/apiserver/observer/fakeobserver"
"github.com/juju/juju/rpc"
"github.com/juju/juju/rpc/jsoncodec"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/juju/testing"
)

Expand Down
4 changes: 2 additions & 2 deletions generate/schemagen/gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package gen
import (
"reflect"

"github.com/bcsaller/jsonschema"
"github.com/juju/errors"
jsonschema "github.com/juju/jsonschema-gen"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver/facade"
"github.com/juju/juju/rpc/rpcreflect"
)

//go:generate mockgen -package gen -destination describeapi_mock.go github.com/juju/juju/generate/schemagen/gen APIServer,Registry
Expand Down
4 changes: 2 additions & 2 deletions generate/schemagen/gen/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ package gen
import (
"reflect"

"github.com/bcsaller/jsonschema"
gomock "github.com/golang/mock/gomock"
jsonschema "github.com/juju/jsonschema-gen"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver/facade"
"github.com/juju/juju/rpc/rpcreflect"
)

type GenSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion rpc/reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"

"github.com/juju/juju/rpc/rpcreflect"
"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/testing"
)

Expand Down
2 changes: 1 addition & 1 deletion rpc/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"

"github.com/SimonRichardson/rpcreflect"
"github.com/juju/juju/apiserver/params"
"github.com/juju/juju/rpc"
"github.com/juju/juju/rpc/jsoncodec"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/juju/testing"
)

Expand Down
Loading

0 comments on commit 90307f6

Please sign in to comment.