Closed pluiedev closed 2 months ago
Plus, IMO having the script install protoc-gen-prost
globally into the system without the user explicitly warned so is a bit questionable to begin with. Once it's installed, it stays forever in ~/.cargo/bin
and very few would even try to look into what's inside there.
A better option would be to check the current PATH, try to look for protoc-gen-prost
, and if it's not found, ask the user whether it wants the script to run cargo install protoc-gen-prost
for them, and tell them that it's a persistent install across your entire system (or at least, across this user's entire environment)
Thanks for the report @pluiedev :)
I'll make sure the next version of Rinf behaves well in offline environments.
Rinf as well as Cargokit(library linker used under the hood) commands actually run various Cargo commands behind the scenes. For example, there are implicit rustup target add android...
, etc. This is done to provide convenience. In my opinion at least telling the user that protoc-gen-prost
is being prepared from the CLI would be nice, yes.
Report
Rinf currently runs
cargo install protoc-gen-prost
regardless of whetherprotoc-gen-prost
is already installed in the system. This is problematic for offline, reproducible builds where build scripts cannot arbitrarily interact with the internet, for example while packaging apps that use Rinf for Nixpkgs.Steps to Reproduce
Here's an example I ran into while trying to package Notiflut, but you can easily reproduce this if you just turn off your internet connection while having
protoc-gen-prost
installed.