-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support explicitly setting field tags #339
Open
jasonewang
wants to merge
15
commits into
openconfig:master
Choose a base branch
from
jasonewang:support-field-number-gen
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Support explicitly setting field tags #339
jasonewang
wants to merge
15
commits into
openconfig:master
from
jasonewang:support-field-number-gen
Commits on Dec 20, 2019
-
Support explicitly setting field tags
The YANG to Protobuf specification mentions using extensions to explicitly set the field tag of generated Protobuf fields. Add support for annotating field tags. * Support setting the field number with occodegenext:field-number. * Support offsetting the field number with occodegenext:field-number-offset. * Reject field number annotations that result in a value in the Protobuf reserved range.
Configuration menu - View commit details
-
Copy full SHA for 24d823d - Browse repository at this point
Copy the full SHA 24d823dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a332dd6 - Browse repository at this point
Copy the full SHA a332dd6View commit details
Commits on Jan 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ed76346 - Browse repository at this point
Copy the full SHA ed76346View commit details
Commits on Jan 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ed1ea13 - Browse repository at this point
Copy the full SHA ed1ea13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ff177f - Browse repository at this point
Copy the full SHA 5ff177fView commit details -
Merge branch 'support-field-number-gen' of github.com:jasonewang/ygot…
… into support-field-number-gen
Configuration menu - View commit details
-
Copy full SHA for c683aa4 - Browse repository at this point
Copy the full SHA c683aa4View commit details
Commits on Jan 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 74a15f7 - Browse repository at this point
Copy the full SHA 74a15f7View commit details
Commits on Feb 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d3f59ee - Browse repository at this point
Copy the full SHA d3f59eeView commit details
Commits on Feb 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 068aec9 - Browse repository at this point
Copy the full SHA 068aec9View commit details
Commits on May 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d65fbb0 - Browse repository at this point
Copy the full SHA d65fbb0View commit details
Commits on Jun 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9afadc5 - Browse repository at this point
Copy the full SHA 9afadc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4795ccf - Browse repository at this point
Copy the full SHA 4795ccfView commit details
Commits on Jun 21, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a87ee45 - Browse repository at this point
Copy the full SHA a87ee45View commit details
Commits on Jun 25, 2021
-
Support explicitly setting proto field tags.
Credits to @jasonewang for posting the first implementation at openconfig#339. I've modified this a bit to read the extension values from the new openconfig-codegen-extensions.yang model that's now in openconfig/public, and also to address some of the corner cases that were discussed in the PR. Spec: https://github.com/openconfig/ygot/blob/master/docs/yang-to-protobuf-transformations-spec.md#field-numbering Corner cases not mentioned in the spec: 1. multiple `field-number` extensions. - Error out. 1. multiple `field-number-offset` extensions. - Add them up. 1. `field-number` or `field-number-offset` extensions on non-leaves. - Silently ignore. 1. `field-number-offset` on non-uses statements, including leafs. - Allow. 1. Conflicts. - Allow. The proto compilation will of course fail. Automated checking can be added here if we'd prefer. I made some simple choices for the above items. Erroring out for 3 and 4 would likely require changing `goyang` to specifically support checking these cases, which I'm not sure is worth it here.
Configuration menu - View commit details
-
Copy full SHA for 179dfb6 - Browse repository at this point
Copy the full SHA 179dfb6View commit details
Commits on Nov 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 4664808 - Browse repository at this point
Copy the full SHA 4664808View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.