FirebaseExtended / protobuf-rules-gen

This is an experimental protoc plugin that generates Firebase Rules for Cloud Firestore based on Google's Protocol Buffer format. This allows you to easily validate your data in a platform independent manner.
Apache License 2.0
197 stars 13 forks source link

Can't setup protoc-gen-firebase_rules (Missing input file) #38

Closed nilsreichardt closed 3 years ago

nilsreichardt commented 4 years ago

I try to set up this library. Unfortunately I have problems with step no. 3:

  1. Either put the plugin binary on your $PATH or use the --plugin=protoc-gen-firebase_rules=./path/to/protoc-gen-firebase_rules option

If I do this, I get this error message: Missing input file.

What I tried:

Additional information:

samtstern commented 3 years ago

@AndroidNils you're missing one more argument: the proto files you want to compile.

I did this and got your error:

$ protoc --plugin=~/Downloads/protoc-gen-firebase_rules --firebase_rules_out=./gen
Missing input file.

And then I pointed to the .proto file and it worked:

$ protoc --plugin=$HOME/Downloads/protoc-gen-firebase_rules --firebase_rules_out=./gen rules.proto