You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's some weird interactions going on, and some things I might like to see changed:
install_protoc.sh checks the protoc version in your path before downloading, and refuses to download if your path's protoc is a different version than you'd like to install
A function called download_binary shouldn't do other checks; those checks should be moved elsewhere.
regenerate.sh calls install_protoc.sh after several other things have been done.
regenerate.sh apparently tries to "save your $PATH", but since it shouldn't be executed via source there's no need to do any of this.
Super nit-picky: install_protoc.sh sources vet_common.sh but is not a vet* script. Maybe rename vet_common.sh to common.sh?
IMO one of three models for these scripts seems pretty reasonable:
Always download everything into a temp directory.
Downside: needs to download/recompile every time regenerate is run
Check the versions in your path and print help/commands to update them to the needed versions.
Downside: it's hard to know where the user would want protoc to live.
Carve out a directory like $HOME/grpc-go-tools or $HOME/tmp/grpc-go-tools or something and download the tools there if the versions don't match.
Downside: you're potentially polluting the user's directory.
Of these, I think I prefer (2) but am not strongly opposed to any of them. It looks like the scripts were already trying to implement (1), which is okay but is my least favorite option.
There's some weird interactions going on, and some things I might like to see changed:
install_protoc.sh
checks the protoc version in your path before downloading, and refuses to download if your path's protoc is a different version than you'd like to installdownload_binary
shouldn't do other checks; those checks should be moved elsewhere.grpc-go/scripts/install_protoc.sh
Line 63 in 45d44a7
grpc-go/scripts/regenerate.sh
Line 54 in 45d44a7
export
in case aGOBIN
isn't already exported:grpc-go/scripts/regenerate.sh
Line 27 in 45d44a7
go install
needs to be able to read it.)regenerate.sh
callsinstall_protoc.sh
after several other things have been done.regenerate.sh
apparently tries to "save your$PATH
", but since it shouldn't be executed viasource
there's no need to do any of this.install_protoc.sh
sourcesvet_common.sh
but is not avet*
script. Maybe renamevet_common.sh
tocommon.sh
?IMO one of three models for these scripts seems pretty reasonable:
$HOME/grpc-go-tools
or$HOME/tmp/grpc-go-tools
or something and download the tools there if the versions don't match.Of these, I think I prefer (2) but am not strongly opposed to any of them. It looks like the scripts were already trying to implement (1), which is okay but is my least favorite option.
cc @arvindbr8 @aranjans
The text was updated successfully, but these errors were encountered: