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

add support for @latest tag name for generators #213

Open
pkieltyka opened this issue Jul 14, 2023 · 2 comments
Open

add support for @latest tag name for generators #213

pkieltyka opened this issue Jul 14, 2023 · 2 comments
Labels
todo items we should do

Comments

@pkieltyka
Copy link
Member

with commands like,

//go:generate go run github.com/webrpc/webrpc/cmd/webrpc-gen -schema=databeat.ridl -target=golang -pkg=proto -server -client -out=./databeat.gen.go

the -target=golang will use the master head of the gen-golang templates. At time of writing, this would be v0.12.x-dev

I'm proposing to add -target=golang@latest which would use the latest tagged version. At time of writing, the latest tagged version for gen-golang is v0.11.0

@VojtechVitek
Copy link
Contributor

I agree with the proposal.

On top of that, I think we should make -target=golang more stable. Perhaps, as in Go, it would also download the latest tagged version.

-target=golang # latest tag
-target=golang@latest # latest tag
-target=golang@v0.11.0 # specific tag
-target=golang@master # master branch
-target=golang@some_other_branch # PR branch

Or even better, I propose we //go:embed the latest stable github.com/webrpc/gen-* generators into webrpc-gen binary. This way we could guarantee the stability and interoperability of the default targets.

-target=golang # stable and tested tag embedded into webrpc-gen, ie. v0.11.2
-target=golang@latest # fetch latest tag
-target=golang@v0.11.0 # fetch specific tag
-target=golang@master # fetch master branch
-target=golang@some_other_branch # fetch PR branch

for non-github.com/webrpc/gen-* repositories, the default would be the same as @latest tag

@pkieltyka pkieltyka added the todo items we should do label Aug 7, 2023
@VojtechVitek
Copy link
Contributor

VojtechVitek commented Apr 9, 2024

As of #266, the -target=golang now uses the //go:embeded version of the golang template, pinned at specific version in go.mod file:

webrpc/go.mod

Line 18 in a3fb4fd

github.com/webrpc/gen-golang v0.14.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo items we should do
Projects
None yet
Development

No branches or pull requests

2 participants