Skip to content

feat: add feature resolution for protobuf editions#2029

Merged
sofisl merged 45 commits intomasterfrom
protobufEditionsWork
Oct 16, 2024
Merged

feat: add feature resolution for protobuf editions#2029
sofisl merged 45 commits intomasterfrom
protobufEditionsWork

Conversation

@sofisl
Copy link
Copy Markdown
Contributor

@sofisl sofisl commented Sep 10, 2024

No description provided.

Comment thread tests/feature_resolution_editions.js Outdated
Comment thread src/parse.js Outdated
Comment thread src/parse.js
Comment thread src/parse.js Outdated
Comment thread src/object.js Outdated
Comment thread src/object.js Outdated
Comment thread tests/feature_resolution_editions.js
Comment thread src/parse.js
Comment thread tests/comp_options.js Outdated
Comment thread tests/api_object.js
Comment thread src/object.js Outdated
Comment thread src/object.js
Comment thread src/object.js Outdated
Comment thread src/parse.js Outdated
Comment thread src/parse.js
Comment thread src/parse.js
Comment thread src/parse.js Outdated
Comment thread tests/api_object.js
Comment thread tests/comp_options.js Outdated
Comment thread tests/feature_resolution_editions.js
Comment thread src/object.js
Comment thread src/object.js Outdated
Comment thread src/object.js Outdated
Comment thread src/object.js Outdated
Comment thread src/object.js Outdated
Comment thread src/parse.js
Comment thread src/enum.js
Comment thread tests/feature_grammar.js Outdated
Comment thread tests/feature_resolution_editions.js
Comment thread tests/feature_resolution_editions.js Outdated
@sofisl sofisl requested a review from mkruskal-google October 4, 2024 22:11
Comment thread src/enum.js Outdated
Comment thread src/object.js Outdated
Comment thread src/object.js Outdated
// (If it's a feature, will just write over)
var newValue = opt[name];
util.setProperty(newValue, propName, value);
util.setProperty(newValue, propName, value, isFeature);
Copy link
Copy Markdown
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?

Comment thread src/object.js
Comment thread tests/feature_resolution_editions.js
Comment thread src/object.js Outdated
Comment thread src/object.js
Comment thread src/object.js Outdated
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js Outdated
@sofisl sofisl requested a review from mkruskal-google October 8, 2024 19:45
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js
Comment thread tests/feature_resolution_editions.js
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js
@sofisl sofisl requested a review from mkruskal-google October 9, 2024 23:11
Comment thread tests/feature_resolution_editions.js Outdated
message Message {
option features.json_format = LEGACY_BEST_EFFORT;
oneof SomeOneOf {
int32 a = 13;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

Comment thread tests/feature_resolution_editions.js
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js
Comment thread tests/feature_resolution_editions.js Outdated
Comment thread tests/feature_resolution_editions.js Outdated
@sofisl sofisl merged commit 547afa2 into master Oct 16, 2024
@dcodeIO dcodeIO deleted the protobufEditionsWork branch April 29, 2026 15:21
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