Qualify address classes in @fromString with inet:: - #1221
torokati44 wants to merge 1 commit into
Conversation
51e70f3 made L3Address and Ipv6Address @editable, so the generated descriptor of any message with a field of these types now calls their @fromString expression. The expression named the class unqualified (L3Address($)), which does not compile in a project whose messages are outside namespace inet; Simu5G failed on its M1Message. All five address classes (MacAddress, L3Address, ClnsAddress, Ipv4Address, Ipv6Address) now spell inet::X($), so the ones that are not @editable yet do not break the same way later.
|
Side note, not addressed here: |
|
Thinking about this, it seems to be the wrong place to fix this. It means that all such properties need to be qualified. How does the type's author supposed to know if the type gets used in any downstream project? |
|
So maybe the message compiler should handle this instead? 🤔 |
51e70f3 made
L3AddressandIpv6Address@editable. Since then, the generated descriptor of any message with a field of these types calls their@fromStringexpression, which named the class without its namespace (L3Address($)). That doesn't compile for messages outsidenamespace inet; Simu5G'sM1Messagefails, for example. This PR spells all five address classes asinet::X($):MacAddress,L3Address,ClnsAddress,Ipv4AddressandIpv6Address. That way the three that aren't@editableyet won't break the same way later.