Details
-
Improvement
-
Status: Resolved
-
Medium
-
Resolution: Done
-
None
-
None
Description
MDSAL-502 describes a rather ugly case where the original models themselves are generated and use a weird mix of naming.
While the complete solution still requires a bijective mapping, that ends up going to Unicode-land for a solution, which will invariably make things very unreadable.
We already need to deal with YANG statement namespace overlap, as we are mapping multiple constructs into Java FQCN namespace: identity, feature, container, etc., so we are already equipped to deal with:
module foo {
identity foo;
feature foo;
container foo;
}
This disambiguation stops at schema tree statements vs. others, hence we do not handle this:
module foo {
anydata foo.bar;
anyxml foo-bar;
container Foo.Bar;
list Foo-Bar;
leaf foo.Bar;
leaf-list foo-Bar;
notification Foo.bar;
rpc Foo-bar;
}
and some other cases we generate Java constructs.
We can improve the situation by generalizing over 'class source statement' and assign a $XX suffix, similar to $F, $G, $I, and $YD we already assign.
There is already a FIXME to assign two-letter suffixes for a number of these, let's bring this in.
The advantage of doing this renaming before MDSAL-502 is that it involves '$', which is not nice, but it does not involve weird Unicode characters (which works, but working with it is a ... memorable .. experience).
Attachments
Issue Links
- split from
-
MDSAL-502 mdsal source generator resolves "-" "_" as the same thing
-
- In Progress
-
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 104241,2 | Expand StatementNamespace | master | mdsal | Status: MERGED | +2 | +1 |