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

Task checklist (Features/TODO) #3

Open
17 of 20 tasks
Aniket21mathur opened this issue Jun 2, 2020 · 8 comments
Open
17 of 20 tasks

Task checklist (Features/TODO) #3

Aniket21mathur opened this issue Jun 2, 2020 · 8 comments

Comments

@Aniket21mathur
Copy link
Owner

Aniket21mathur commented Jun 2, 2020

Following is a possible task checklist for the library-

@lydia-duncan
Copy link
Collaborator

Add support for repeated/reserved fields.

Does this refer to optional vs required or is it something else entirely?

@lydia-duncan
Copy link
Collaborator

I think we'll also want to think about if we should generate both Chapel classes and Chapel records or if we should stick to just records (though definitely not right away). And also ways of supporting types that are unique to Chapel, such as ranges and domains (and how we'd specify array fields either way). Again, not an immediate thing to work on, just something to put on the list.

@Aniket21mathur
Copy link
Owner Author

Aniket21mathur commented Jun 2, 2020

Does this refer to optional vs required or is it something else entirely?

No, they are something different. The optional/required specifiers were removed in proto3, that's why I didn't add those to the list. You can see -> Why required and optional is removed in Protocol Buffers 3 😛

repeated allow us to repeat a message field any number of times.

reserved is used to reserve some field numeric values. From the official documentation ->

If you update an enum type by entirely removing an enum entry, or commenting it out, future users can reuse the numeric value when making their own updates to the type. This can cause severe issues if they later load old versions of the same .proto, including data corruption, privacy bugs, and so on. One way to make sure this doesn't happen is to specify that the numeric values (and/or names, which can also cause issues for JSON serialization) of your deleted entries are reserved. The protocol buffer compiler will complain if any future users try to use these identifiers. You can specify that your reserved numeric value range goes up to the maximum possible value using the max keyword.

We don't have to do much for reserved I guess, the protoc compiler will take care of it.

@lydia-duncan
Copy link
Collaborator

The optional/required specifiers were removed in proto3, that's why I didn't add those to the list.

Dang, they need to update their documentation page (or update the link that Google finds first)

@Aniket21mathur

This comment has been minimized.

@lydia-duncan

This comment has been minimized.

@lydia-duncan

This comment has been minimized.

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

No branches or pull requests

4 participants
@lydia-duncan @Aniket21mathur and others