Closed ALEZ-DEV closed 11 months ago
Hi @ALEZ-DEV , thank you for the report :)
Could you share the content of your .proto
file with optional fields, so that I can take a look? Maybe this can be done easily as we only need to add that argument to the protobuf command.
There is my proto file :
syntax = "proto3";
package librqbit_torrent;
message TorrentAddInfo {
string magnet_link = 1;
}
message TorrentAddedInfo {
bool has_been_added = 1;
}
message CurrentTorrentDownloadInfo {
repeated TorrentState torrents_state = 1;
}
message TorrentState {
optional int64 id = 1;
optional double pourcent = 2;
optional string progress = 3;
optional string remaining = 4;
optional string total = 5;
optional double downspeed = 6;
optional int64 peers = 7;
TorrentStartState state = 8;
optional string name = 9;
}
enum TorrentStartState {
Initializing = 0;
Running = 1;
}
message newSessionInfo {
string directory_path = 1;
}
Hmm, at least this .proto
code works well on Windows, as you said.
I dived into the Protobuf documentation and found out that from protoc
version 3.15, we do not need that --experimental_allow_proto3_optional
argument:
On your Linux machine, could you check that your protoc
version is 3.15 or higher, with this command?
protoc --version
oh, you're right, my version was outdated :
libprotoc 3.12.4
I will see how to update it Thank you for your help !
Report
Hey,
I have an issue with protobuf, because I use the
optional
feature on my proto files, because of rust optional and all... When I compile on my windows computer all compile fine, too in the CI I made for windows compilation, but when I try to compile to my linux CI to make a linux and apk executable, I get this error :Suggestion
That will be cool if you can add the
--experimental_allow_proto3_optional
features, this can be something like that :rinf message --experimental_allow_proto3_optional
I will wait for your response to continue the CI
Thank you for your hard work on this project !