[MDSAL-746] Improve BitsTypeObject storage Created: 11/Apr/22 Updated: 09/Jan/24 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Epic Link: | Evolve bits mapping | ||||||||||||||||||||
| Description |
|
Separate from
Specialize codegen to recognize these three classes and store the set bits in the appropriate storage class, providing the required methods on bit operations. This will drop storage requirements (when compared to |
| Comments |
| Comment by Robert Varga [ 11/Apr/22 ] |
|
YANGTOOLS-1426 proposes to make similar improvements on yang.data.api level. While mdsal is free to its own thing (because "codegen"!) it would be nice if we could share some of the solution space. |
| Comment by Robert Varga [ 10/Nov/22 ] |
|
So we are in a bit of a pickle w.r.t. serialization, I think. serialVersionUID is based on properties, but it really needs to reflect resulting class layout as well to be really accurate. The problem is that the current patch does not change serial version, even when fields change from individual booleans to ints/whatever. I am not sure what to about this: I think serialVersionUID needs to capture both the properties and the resulting layout (hence mdsal-binding-generator needs to know about these). Lets punt this for the next release. |
| Comment by Robert Varga [ 10/Nov/22 ] |
|
I think we should do this only after MDSAL-764, which will give us a proper structure for what kinds of things we want to generate. Once we have that, we will have a BitsTypeObjectArchetype, which can capture the layout vs. properties difference, thus communicating clearly what needs to be generated and how. On java-api-generator side this also implies creating a BitsTypeObjectTemplate and pulling bits-related special-cases there. |