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

feat: add feature resolution for protobuf editions #2029

Merged
merged 45 commits into from
Oct 16, 2024
Merged

Conversation

sofisl
Copy link
Contributor

@sofisl sofisl commented Sep 10, 2024

No description provided.

tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
src/parse.js Outdated Show resolved Hide resolved
src/parse.js Show resolved Hide resolved
src/parse.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
src/parse.js Show resolved Hide resolved
tests/comp_options.js Outdated Show resolved Hide resolved
tests/api_object.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/parse.js Outdated Show resolved Hide resolved
src/parse.js Show resolved Hide resolved
src/parse.js Outdated Show resolved Hide resolved
src/parse.js Outdated Show resolved Hide resolved
tests/api_object.js Outdated Show resolved Hide resolved
tests/comp_options.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
src/object.js Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/parse.js Show resolved Hide resolved
src/enum.js Show resolved Hide resolved
tests/feature_grammar.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
src/enum.js Outdated Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Outdated
var newValue = opt[name];
util.setProperty(newValue, propName, value);
util.setProperty(newValue, propName, value, isFeature);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, the regex is only wrong if name is the fully feature path. If it's always just features, this will overwrite the entire features object for each specified feature right? It'll only keep the last one?

src/object.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
src/object.js Show resolved Hide resolved
src/object.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
message Message {
option features.json_format = LEGACY_BEST_EFFORT;
oneof SomeOneOf {
int32 a = 13;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can put features in oneofs (same syntax as for message), do those work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the pattern of your other tests, I'd expect these two tests to be collapsed into one that tests both inheritance and overriding of message -> oneof

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that tested in the test below? (feature resolution inheritance oneofs)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindof, it's not clear why this one is split into two when all of the other ones test both things in a single test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I merged it into one test!

tests/feature_resolution_editions.js Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Outdated Show resolved Hide resolved
tests/feature_resolution_editions.js Show resolved Hide resolved
@sofisl sofisl merged commit 547afa2 into master Oct 16, 2024
6 checks passed
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