Fix proto for rust march update #77
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The recent rust update broke compatibility with the existing proto file.
The absence of certain fields when they have their default value, makes it seen, like FP switched to
proto3:
In Proto3, missing fields in the response, which are required by proto definitions, are treated as they have their default values set. So receiving (queuedPlayers missing):
will be evaluated as if
queuedPlayers: 0
.By simple migrating the proto file, every message i received so far could be parsed without issues.
This just removed the required annotation on each field + sets proto3 as version.
WARNING: Enums are required to be 0-based in proto3. I wasnt sure how facepunch is handling this, so i for now introduced a RESERVED enum value for AppEntityType and EntityType. This is not tested yet, and this can break stuff, when facepunch decided to move the existing enums from
to
Just comment when your alarm is acting like an switch :)