bingo
bingo copied to clipboard
Advice for integrated versions
github.com/envoyproxy/protoc-gen-validate is an example of something used both as a binary (codegen) and a library. It is very version sensitive, so bingo version has to match go.mod. bingo is still nice as it pins the version in protoc. what advice do you have for coupled versions between bingo and go.mod?
Just to unpack this, do you mean having main go.mod and then bingo controlled protoc-gen-validate
and ability to sync them.
Good point. Normally you need to update both places to have them synced. It is rare case, but one way would be to try add bingo mode that would reuse your main go.mod directly? 🤔 (Without auto replace logic). I think that could work.
Help wanted for PRs
It won't be super easy, but doable. Open for other suggestions too
I agree that re-using a version from go.mod would be the simplest and most likely to stay up to date. OTOH I also can understand this might be tricky, especially with replace statements.
Meanwhile updating both is I guess the best way out. Possibly the workaround could be to maybe check the version is the same somehow for the special case of this validate lib...