Skip to content

Commit

Permalink
feat: migrate to lro & iam submodules (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed Mar 1, 2023
1 parent 0ecd500 commit 76944b9
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 31 deletions.
24 changes: 11 additions & 13 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ http_archive(
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains(
version = "1.18.6",
)

http_archive(
name = "bazel_gazelle",
sha256 = "efbbba6ac1a4fd342d5122cbdfdb82aeb2cf2862e35022c752eaddffada7c3f3",
Expand All @@ -71,12 +63,18 @@ http_archive(
],
)

# gazelle:repo bazel_gazelle
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

load("//:repositories.bzl", "com_googleapis_gapic_generator_go_repositories")

# gazelle:repository_macro repositories.bzl%com_googleapis_gapic_generator_go_repositories
com_googleapis_gapic_generator_go_repositories()

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_register_toolchains(version = "1.18.6")

go_rules_dependencies()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/googleapis/gapic-generator-go

require (
cloud.google.com/go/iam v0.12.0
cloud.google.com/go/longrunning v0.4.1
github.com/ghodss/yaml v1.0.0
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.9
Expand All @@ -11,8 +13,6 @@ require (
)

require (
cloud.google.com/go/iam v0.12.0 // indirect
cloud.google.com/go/longrunning v0.4.1 // indirect
gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 // indirect
gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 // indirect
gitlab.com/golang-commonmark/mdurl v0.0.0-20191124015652-932350d1cb84 // indirect
Expand Down
2 changes: 1 addition & 1 deletion internal/gencli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ go_library(
"//internal/printer",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_jhump_protoreflect//desc",
"@com_google_cloud_go_longrunning//autogen/longrunningpb",
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/longrunning:longrunning_go_proto",
"@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
],
Expand Down
2 changes: 1 addition & 1 deletion internal/gencli/gencli.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import (

"github.com/jhump/protoreflect/desc"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/googleapis/gapic-generator-go/internal/errors"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"github.com/googleapis/gapic-generator-go/internal/printer"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/genproto/googleapis/longrunning"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions internal/gengapic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ go_library(
"//internal/printer",
"@com_github_ghodss_yaml//:yaml",
"@com_gitlab_golang_commonmark_markdown//:markdown",
"@com_google_cloud_go_iam//apiv1/iampb",
"@com_google_cloud_go_longrunning//autogen/longrunningpb",
"@go_googleapis//gapic/metadata:metadata_go_proto",
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/api:serviceconfig_go_proto",
"@go_googleapis//google/cloud:extended_operations_go_proto",
"@go_googleapis//google/cloud/location:location_go_proto",
"@go_googleapis//google/iam/v1:iam_go_proto",
"@go_googleapis//google/longrunning:longrunning_go_proto",
"@go_googleapis//google/rpc:code_go_proto",
"@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
Expand Down Expand Up @@ -72,12 +72,12 @@ go_test(
"//internal/pbinfo",
"//internal/txtdiff",
"@com_github_google_go_cmp//cmp",
"@com_google_cloud_go_longrunning//autogen/longrunningpb",
"@go_googleapis//gapic/metadata:metadata_go_proto",
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/api:httpbody_go_proto",
"@go_googleapis//google/api:serviceconfig_go_proto",
"@go_googleapis//google/cloud:extended_operations_go_proto",
"@go_googleapis//google/longrunning:longrunning_go_proto",
"@go_googleapis//google/rpc:code_go_proto",
"@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ package gengapic
import (
"strings"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/googleapis/gapic-generator-go/internal/errors"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (
"path/filepath"
"testing"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/google/go-cmp/cmp"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"github.com/googleapis/gapic-generator-go/internal/txtdiff"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/genproto/googleapis/api/serviceconfig"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/apipb"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/gengapic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
"sort"
"testing"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/google/go-cmp/cmp"
conf "github.com/googleapis/gapic-generator-go/internal/grpc_service_config"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"github.com/googleapis/gapic-generator-go/internal/txtdiff"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/runtime/protoiface"
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/genrest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"sort"
"testing"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/google/go-cmp/cmp"
Expand All @@ -29,7 +30,6 @@ import (
"google.golang.org/genproto/googleapis/api/httpbody"
"google.golang.org/genproto/googleapis/api/serviceconfig"
"google.golang.org/genproto/googleapis/cloud/extendedops"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/runtime/protoiface"
Expand Down
2 changes: 1 addition & 1 deletion internal/gengapic/lro.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"fmt"
"strings"

longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/proto"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/gengapic/mixins.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"fmt"
"regexp"

iam "cloud.google.com/go/iam/apiv1/iampb"
longrunning "cloud.google.com/go/longrunning/autogen/longrunningpb"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/genproto/googleapis/cloud/location"
iam "google.golang.org/genproto/googleapis/iam/v1"
"google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
)
Expand Down
1 change: 0 additions & 1 deletion repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2019,5 +2019,4 @@ def go_repository(name, importpath, sum, version, build_file_proto_mode = "", bu
version = version,
build_file_proto_mode = build_file_proto_mode,
build_extra_args = build_extra_args,
repo_mapping = {"@go_googleapis": "@com_google_googleapis"},
)
2 changes: 1 addition & 1 deletion showcase/echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"testing"
"time"

"cloud.google.com/go/iam/apiv1/iampb"
"github.com/google/go-cmp/cmp"
showcase "github.com/googleapis/gapic-showcase/client"
showcasepb "github.com/googleapis/gapic-showcase/server/genproto"
Expand All @@ -34,7 +35,6 @@ import (
"google.golang.org/api/iterator"
"google.golang.org/api/option"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
iampb "google.golang.org/genproto/googleapis/iam/v1"
spb "google.golang.org/genproto/googleapis/rpc/status"
grpc "google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
4 changes: 2 additions & 2 deletions showcase/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ go 1.19

require (
cloud.google.com/go v0.110.0
cloud.google.com/go/iam v0.12.0
cloud.google.com/go/longrunning v0.4.1
github.com/google/go-cmp v0.5.9
github.com/googleapis/gapic-showcase v0.25.0
github.com/googleapis/gax-go/v2 v2.7.0
Expand All @@ -16,8 +18,6 @@ require (
require (
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
cloud.google.com/go/longrunning v0.4.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
Expand Down

0 comments on commit 76944b9

Please sign in to comment.