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

Add experimental edition feature resolver #628

Merged
merged 5 commits into from
Nov 28, 2023

Conversation

timostamm
Copy link
Member

This PR adds the class FeatureResolver, which implements the algorithm to compile defaults for an edition as documented here. Since we do not support extensions yet (tracked in #86), feature extensions are also not supported in the algorithm.

The class is not exported. It is unclear whether we want to keep it at all, since protoc has the ability to generate defaults (which we started to use with #615). We can delete it once editions are no longer experimental. Until then, it seems like a good idea to keep the code.

Instead of assuming that EXPANDED means that the field is not packed, be specific and check for PACKED, because it's unlikely but possible that more values are added to the enumeration in the future.
@timostamm timostamm requested review from a team, jhump and chrispine November 23, 2023 16:29
Base automatically changed from tstamm/expose-edition-features to main November 28, 2023 10:43
@timostamm timostamm changed the title Add feature resolver Add experimental edition feature resolver Nov 28, 2023
@timostamm timostamm merged commit ee1f0ab into main Nov 28, 2023
6 checks passed
@timostamm timostamm deleted the tstamm/edition-feature-resolver-port branch November 28, 2023 11:37
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 this pull request may close these issues.

2 participants