Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Protobuf exercise (lifetimes) #2466

Open
mering opened this issue Nov 23, 2024 · 1 comment · May be fixed by #2475
Open

Clarify Protobuf exercise (lifetimes) #2466

mering opened this issue Nov 23, 2024 · 1 comment · May be fixed by #2475

Comments

@mering
Copy link

mering commented Nov 23, 2024

Without knowing the Protobuf wire format, the exercise description and example code is hard to understand.
It would have helped to add an additional sentence describing that submessages (like PhoneNumber as part of Person) are encoded as Len type of the encoded submessage (1. encode PhoneNumber 2. store it as Len type field in the Person wire format).

Also the name Len for basically a length annotated byte array is a bit unintuitive.

Furthermore, it would have helped to have the tests already be presented as part of the exercise and not only as part of the solution.

@djmitche
Copy link
Collaborator

Thanks! I'll add some more explanation of the protocol format. You're right that LEN isn't very intuitive, but it's how Proto is defined!

I'll move the tests into main to make them visible.

@djmitche djmitche linked a pull request Nov 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants