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 Go quick start to work with grpc-go v1.30.0-dev.1 or v1.30.0 #306

Closed
chalin opened this issue Jun 23, 2020 · 14 comments · Fixed by #319
Closed

Update Go quick start to work with grpc-go v1.30.0-dev.1 or v1.30.0 #306

chalin opened this issue Jun 23, 2020 · 14 comments · Fixed by #319
Assignees

Comments

@chalin
Copy link
Collaborator

chalin commented Jun 23, 2020

In #304, the grpc_go_release_tag was updated:

-  grpc_go_release_tag: v1.30.0-dev.1
+  grpc_go_release_tag: v1.30.0

I'm going to revert this since the instructions aren't working otherwise. For context, see #298 (comment).

@dfawley
Copy link
Member

dfawley commented Jun 23, 2020

Why don't they work with v1.30.0?

@chalin
Copy link
Collaborator Author

chalin commented Jun 23, 2020

Because v1.30.0 has both flavors of the generated files, see https://github.com/grpc/grpc-go/tree/master/examples/helloworld/helloworld:

image

As a result we run into the problem reported in grpc/grpc-go#3688.

@chalin
Copy link
Collaborator Author

chalin commented Jun 23, 2020

Is there something I'm missing, and it should be working with v1.30.0?

@dfawley
Copy link
Member

dfawley commented Jun 23, 2020

Ideally we'd be using the latest release. But our latest tag has pb.gos generated with the new, still-experimental codegen tool. Maybe the release instructions should rm -rf the generated code files before regenerating? Another option is we could revert the examples so they are generated using the legacy codegen tool.

@chalin
Copy link
Collaborator Author

chalin commented Jun 23, 2020

Another option is we could revert the examples so they are generated using the legacy codegen tool.

#307 does that.

Maybe the release instructions should rm -rf the generated code files before regenerating?

I can certainly update the quick start to include the rm instruction (with a note stating that this is temporary until, say, cmd/protoc-gen-go-grpc is officially released as part of grpc-go).

Which approach do you prefer?

@dfawley
Copy link
Member

dfawley commented Jun 23, 2020

#307 does that.

No, I mean the pb.gos checked in in the grpc-go repo.

Option 3 would be to use protoc-gen-go-grpc at v0.0.

My preference would be to keep these quick start instructions on the latest release and revert #307. Option 3 does seem like the best idea, actually, given that's the direction we will want people to go once it is released at v1.0.

@chalin
Copy link
Collaborator Author

chalin commented Jun 23, 2020

No, I mean the pb.gos checked in in the grpc-go repo.

Right, but that wouldn't help us address the situation are are in right now. By "#307 does that", I meant that by cloning v1.30.0-dev.1, users get example sources that contain pb.gos "generated using the legacy codegen tool" only.

Option 3 would be to use protoc-gen-go-grpc at v0.0. ... Option 3 does seem like the best idea, actually

Ok, but then you'll need to give me some guidance on how to update the quick start instructions. If it would be easier, I wouldn't mind hopping onto a call with you. Let me know.

@chalin
Copy link
Collaborator Author

chalin commented Jun 24, 2020

@dfawley - PTAL at #313, I think that it is a step forward in the direction that you wanted.

@chalin chalin changed the title Revert grpc-go version update Update Go quick start to work with grpc-go v1.30.0-dev.1 or v1.30.0 Jun 25, 2020
@dfawley
Copy link
Member

dfawley commented Jun 25, 2020

#313 is Option 1. This is okay. Option 3 is to use the new codegen tool in cmd/protoc-gen-go-grpc to generate the files (exactly as regenerate.sh does, so no need to rm them first). This might be a little nicer, but still requires a small disclaimer about the codegen tool not being v1.0 yet. But #313 works. So I'm okay with it if you don't want to redo things. (But we will still ultimately need to update the instructions to use cmd/protoc-gen-go-grpc after it is released.)

@dfawley
Copy link
Member

dfawley commented Jun 25, 2020

Oh, and I'm always happy to hop on a chat/call with you to discuss / help. Feel free to reach out directly any time!

@chalin
Copy link
Collaborator Author

chalin commented Jun 25, 2020

Ok, let me explore option 3 and let you know if I have any questions. (Btw, the Hangout invite I sent to you is still pending :))

@chalin
Copy link
Collaborator Author

chalin commented Jun 25, 2020

Does cmd/protoc-gen-go-grpc support source_relative, if so, what option(s) should I use? I seems to be ignoring --go_opt=paths=source_relative.

@dfawley
Copy link
Member

dfawley commented Jun 25, 2020

Since it's a different binary, you need to use go-grpc_opt as well as go_out now. See https://github.com/grpc/grpc-go/blob/master/regenerate.sh#L60 for an example.

@chalin
Copy link
Collaborator Author

chalin commented Jun 25, 2020

@dfawley - see #319 for option 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants