Skip to content

Commit f39048f

Browse files
authored
Merge branch 'main' into page-doc-2
2 parents 0b1a73e + ae37381 commit f39048f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+978
-869
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## [0.48.1](https://github.com/googleapis/gapic-generator-go/compare/v0.48.0...v0.48.1) (2024-11-14)
4+
5+
6+
### Bug Fixes
7+
8+
* Improve imports behavior for helpers.go ([#1583](https://github.com/googleapis/gapic-generator-go/issues/1583)) ([5414611](https://github.com/googleapis/gapic-generator-go/commit/541461104f44af7241a5426170a36e2c6fc24e43))
9+
10+
## [0.48.0](https://github.com/googleapis/gapic-generator-go/compare/v0.47.1...v0.48.0) (2024-11-13)
11+
12+
13+
### Features
14+
15+
* Split doc.go generation into comments and code portions ([#1579](https://github.com/googleapis/gapic-generator-go/issues/1579)) ([396b171](https://github.com/googleapis/gapic-generator-go/commit/396b171c9460573fbfbdee31b0d9ab90b8dfb407))
16+
17+
18+
### Bug Fixes
19+
20+
* Make iterator link clickable ([#1576](https://github.com/googleapis/gapic-generator-go/issues/1576)) ([6249624](https://github.com/googleapis/gapic-generator-go/commit/624962423ddf8b57b9b0cd4138bde6bbdd491427))
21+
22+
## [0.47.1](https://github.com/googleapis/gapic-generator-go/compare/v0.47.0...v0.47.1) (2024-10-09)
23+
24+
25+
### Bug Fixes
26+
27+
* **internal/gencli:** Revert broken migration to protobuf-go v2 in gencli ([#1573](https://github.com/googleapis/gapic-generator-go/issues/1573)) ([ece235a](https://github.com/googleapis/gapic-generator-go/commit/ece235a8b2aa96680e78906d0dacf409bd4deec9))
28+
29+
## [0.47.0](https://github.com/googleapis/gapic-generator-go/compare/v0.46.2...v0.47.0) (2024-08-28)
30+
31+
32+
### Features
33+
34+
* **gengapic:** Move all libraries to new auth lib ([#1564](https://github.com/googleapis/gapic-generator-go/issues/1564)) ([74b6c39](https://github.com/googleapis/gapic-generator-go/commit/74b6c39e442857ee568756c0fff8bc3c68200cc7))
35+
336
## [0.46.2](https://github.com/googleapis/gapic-generator-go/compare/v0.46.1...v0.46.2) (2024-08-19)
437

538

WORKSPACE

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
2828

2929
protobuf_deps()
3030

31+
http_archive(
32+
name = "rules_proto",
33+
sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
34+
strip_prefix = "rules_proto-6.0.2",
35+
url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz",
36+
)
37+
38+
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
39+
rules_proto_dependencies()
40+
41+
load("@rules_proto//proto:setup.bzl", "rules_proto_setup")
42+
rules_proto_setup()
43+
44+
load("@rules_proto//proto:toolchains.bzl", "rules_proto_toolchains")
45+
rules_proto_toolchains()
46+
3147
http_archive(
3248
name = "com_google_googleapis",
3349
# Use `master` because googleapis isn't semantically versioned and the protos
@@ -42,10 +58,10 @@ switched_rules_by_language(name = "com_google_googleapis_imports", go = True, gr
4258

4359
http_archive(
4460
name = "io_bazel_rules_go",
45-
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
61+
sha256 = "d93ef02f1e72c82d8bb3d5169519b36167b33cf68c252525e3b9d3d5dd143de7",
4662
urls = [
47-
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
48-
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
63+
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.49.0/rules_go-v0.49.0.zip",
64+
"https://github.com/bazelbuild/rules_go/releases/download/v0.49.0/rules_go-v0.49.0.zip",
4965
],
5066
)
5167

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/googleapis/gapic-generator-go
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
cloud.google.com/go/iam v1.1.11

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ gitlab.com/opennota/wd v0.0.0-20180912061657-c5d65f63c638/go.mod h1:EGRJaqe2eO9X
2929
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
3030
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
3131
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
32+
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
3233
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
3334
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
3435
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=

internal/gencli/gencli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (g *gcli) genCommands() {
191191
})
192192

193193
putImport(cmd.Imports, &pbinfo.ImportSpec{
194-
Path: "google.golang.org/protobuf/jsonpb",
194+
Path: "github.com/golang/protobuf/jsonpb",
195195
})
196196

197197
if !cmd.ClientStreaming {

internal/gencli/root_file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import (
3131
"fmt"
3232
"os"
3333
34+
"github.com/golang/protobuf/jsonpb"
35+
"github.com/golang/protobuf/proto"
3436
"github.com/spf13/cobra"
35-
"google.golang.org/protobuf/jsonpb"
36-
"google.golang.org/protobuf/proto"
3737
)
3838
3939
var Verbose, OutputJSON bool

internal/gencli/service_file_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"testing"
2121

2222
"github.com/googleapis/gapic-generator-go/internal/pbinfo"
23+
2324
"github.com/googleapis/gapic-generator-go/internal/txtdiff"
2425
)
2526

@@ -36,7 +37,7 @@ func TestServiceFile(t *testing.T) {
3637
root: "Root",
3738
format: true,
3839
imports: map[string]*pbinfo.ImportSpec{
39-
"test": &pbinfo.ImportSpec{Name: "proto", Path: "google.golang.org/protobuf/proto"},
40+
"test": &pbinfo.ImportSpec{Name: "proto", Path: "github.com/golang/protobuf/proto"},
4041
},
4142
subcommands: map[string][]*Command{
4243
name: []*Command{

internal/gencli/testdata/root_file.want

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"fmt"
99
"os"
1010

11+
"github.com/golang/protobuf/jsonpb"
12+
"github.com/golang/protobuf/proto"
1113
"github.com/spf13/cobra"
12-
"google.golang.org/protobuf/jsonpb"
13-
"google.golang.org/protobuf/proto"
1414
)
1515

1616
var Verbose, OutputJSON bool

internal/gencli/testdata/service_file.want

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"google.golang.org/grpc"
1313
"google.golang.org/grpc/credentials/insecure"
1414

15-
proto "google.golang.org/protobuf/proto"
15+
proto "github.com/golang/protobuf/proto"
1616
)
1717

1818
var TodoConfig *viper.Viper

internal/gengapic/client_init_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ func TestClientInit(t *testing.T) {
414414
{Name: "iampb", Path: "cloud.google.com/go/iam/apiv1/iampb"}: true,
415415
{Name: "locationpb", Path: "google.golang.org/genproto/googleapis/cloud/location"}: true,
416416
{Name: "mypackagepb", Path: "github.com/googleapis/mypackage"}: true,
417+
{Path: "log/slog"}: true,
417418
},
418419
wantNumSnps: 6,
419420
},
@@ -436,6 +437,7 @@ func TestClientInit(t *testing.T) {
436437
{Name: "iampb", Path: "cloud.google.com/go/iam/apiv1/iampb"}: true,
437438
{Name: "locationpb", Path: "google.golang.org/genproto/googleapis/cloud/location"}: true,
438439
{Name: "mypackagepb", Path: "github.com/googleapis/mypackage"}: true,
440+
{Path: "log/slog"}: true,
439441
},
440442
wantNumSnps: 6,
441443
},
@@ -453,6 +455,7 @@ func TestClientInit(t *testing.T) {
453455
{Name: "gtransport", Path: "google.golang.org/api/transport/grpc"}: true,
454456
{Name: "mypackagepb", Path: "github.com/googleapis/mypackage"}: true,
455457
{Name: "httptransport", Path: "google.golang.org/api/transport/http"}: true,
458+
{Path: "log/slog"}: true,
456459
},
457460
wantNumSnps: 1,
458461
},
@@ -472,6 +475,7 @@ func TestClientInit(t *testing.T) {
472475
{Path: "context"}: true,
473476
{Path: "google.golang.org/api/option"}: true,
474477
{Path: "google.golang.org/grpc"}: true,
478+
{Path: "log/slog"}: true,
475479
},
476480
wantNumSnps: 6,
477481
},
@@ -489,6 +493,7 @@ func TestClientInit(t *testing.T) {
489493
{Path: "google.golang.org/api/option/internaloption"}: true,
490494
{Path: "google.golang.org/grpc"}: true,
491495
{Path: "net/http"}: true,
496+
{Path: "log/slog"}: true,
492497
},
493498
wantNumSnps: 1,
494499
},
@@ -506,6 +511,7 @@ func TestClientInit(t *testing.T) {
506511
{Path: "net/http"}: true,
507512
{Name: "httptransport", Path: "google.golang.org/api/transport/http"}: true,
508513
{Name: "mypackagepb", Path: "github.com/googleapis/mypackage"}: true,
514+
{Path: "log/slog"}: true,
509515
},
510516
wantNumSnps: 1,
511517
setExt: func() (protoreflect.ExtensionType, interface{}) {

0 commit comments

Comments
 (0)