cunarist / rinf

Rust for native business logic, Flutter for flexible and beautiful GUI
MIT License
1.82k stars 64 forks source link

[Issue with rinf CLI] Every time `rinf message` adds `package` and `systax` to the beginning of the .proto file, even if `package` is already appended #383

Closed EnvOut closed 2 months ago

EnvOut commented 2 months ago

Hi,

In my pet project, I already used protobuf messages and decided to try rinf. However, each time after running rinf message, rinf adds the package and syntax at the beginning of the .proto file, even if the package is already specified. So I have to manually delete the package and syntax from the file and only then run rinf message. Otherwise, I get a compilation error and a .proto file like this:

syntax = "proto3";
package contact.common;
package contact.common;
package contact.common;
package contact.common;
import "google/protobuf/timestamp.proto";

// <---- EventDefinition ---->
enum EventKind {
...

Is there a flag that allows disabling the addition of syntax and package at the beginning of the file?

cargo rinf version: v6.12.1