Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use google.golang.org/protobuf #1

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented Jan 5, 2023

I was needing this generated code to not use golang/protobuf anymore. While that would have been pretty trivial in and of itself I also took the time to migrate the code generator to using google.golang.org/protobuf/compiler/protogen instead of the various other packages pulled from golang/protobuf and grpc-gateway protoc generator internals.

The new protogen package allows for a big simplification in the generator overall.

Most of the removed lines are due to the vendor directory being removed.

@mkeeler mkeeler merged commit 9573922 into master Jan 5, 2023
erichaberkorn added a commit to hashicorp/consul that referenced this pull request Jan 6, 2023
After hashicorp/protoc-gen-go-binary#1, the build tags
were inserted twice. This resulted in errors like:

`proto/pbautoconf/auto_config_ent.go:9:2: partition.pb.binary.go: multiple //go:build comments`

and diffs like:

```
circleci@9356716f44df:~/project$ git diff
diff --git a/proto/pbnamespace/namespace.pb.binary.go b/proto/pbnamespace/namespace.pb.binary.go
index 81bfdba402..afc71613c7 100644
--- a/proto/pbnamespace/namespace.pb.binary.go
+++ b/proto/pbnamespace/namespace.pb.binary.go
@@ -1,6 +1,9 @@
 //go:build consulent
 // +build consulent

+//go:build consulent
+// +build consulent
+
 // Code generated by protoc-gen-go-binary. DO NOT EDIT.
 // source: proto/pbnamespace/namespace.proto

diff --git a/proto/pbpartition/partition.pb.binary.go b/proto/pbpartition/partition.pb.binary.go
index e7c74837de..71cf66c015 100644
--- a/proto/pbpartition/partition.pb.binary.go
+++ b/proto/pbpartition/partition.pb.binary.go
@@ -1,6 +1,9 @@
 //go:build consulent
 // +build consulent

+//go:build consulent
+// +build consulent
+
 // Code generated by protoc-gen-go-binary. DO NOT EDIT.
 // source: proto/pbpartition/partition.proto
```

This removes the code that manually copies the build tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant