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

Use debug.ReadBuildInfo for retrieving plugin version #3023

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Semior001
Copy link

@Semior001 Semior001 commented Nov 21, 2022

References to other Issues or PRs

closes #3022

Have you read the Contributing Guidelines?

Yes

Brief description of what is fixed or changed

Retrieve version of grpc-gateway and openapiv2 plugins via debug.ReadBuildInfo, upgraded go version to 1.18 (probably last part is not necessary)

Other comments

@google-cla
Copy link

google-cla bot commented Nov 21, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

protoc-gen-grpc-gateway/main.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, but is not what I meant. You've got the new files right, but I don't want them to be using an init function like this. Instead, please define a readVersion both in each of the go1.18 specific files and in some non-go1.18 specific files, so that the function is always available, then call the function from the main file like you did before. Does that make sense?

@Semior001
Copy link
Author

Sorry for the confusion, but is not what I meant. You've got the new files right, but I don't want them to be using an init function like this. Instead, please define a readVersion both in each of the go1.18 specific files and in some non-go1.18 specific files, so that the function is always available, then call the function from the main file like you did before. Does that make sense?

Okay, got it. Please, check out the latest version of PR.

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

@johanbrandhorst
Copy link
Collaborator

The bazel build is failing because the new files have not been added to the bazel definitions. Please run the file regeneration commands: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/CONTRIBUTING.md#i-want-to-regenerate-the-files-after-making-changes.

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 18, 2023
@tikto29
Copy link

tikto29 commented Aug 23, 2024

$ go install
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
google.golang.org/protobuf/cmd/protoc-gen-go
google.golang.org/grpc/cmd/protoc-gen-go-grpc a

@stale stale bot removed the wontfix label Aug 23, 2024
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.

Use debug.ReadBuildInfo() for retrieving a version
3 participants