simple-binary-encoding
simple-binary-encoding copied to clipboard
Adding support for the package attribute on the types element.
Implementation of #507 for Java.
The main idea is that we store the package attribute read from the XML to the IR, into token[0]. Then it's up to the generator to make use of that extra piece of information (controllable through sbe.type.package.override
argument, defaulting to false
).
The serialization of the IR is not touched, therefore the package information is not present in the serialized IR.
Some classes in this PR, like the MultiPackageOutputManager
and StringWriterOutputManager
actually belong to agrona, but have been implemented here to have a testable code.
Before merging, those files/classes should be moved and substituted with a new release of agrona.
@mjpt777 @tmontgomery Hi, subject to Your time permitting, I'd appreciate a 1st, rough review of this. Thanks.
Sorry but we have been busy. We need to give priority to our commercial support customers.
Sure, take your time. Just wanted to make sure this blipped on your radar.
Created https://github.com/real-logic/agrona/pull/266 for the required changes in agrona.
@ratcashdev Agrona 1.17.0 was released and it contains https://github.com/real-logic/agrona/pull/266.
updated to latest master.
Ok, will enhance the tests as a separate PR. Thanks for the fix.
just realized, the case below also needs to be taken care of or at least tested (REF pointing to a type in a different package):
<types package="specific.package.name.A">
<enum name="booleanEnum" encodingType="uint8" semanticType="Boolean">
<validValue name="F">0</validValue>
<validValue name="T">1</validValue>
</enum>
</types>
<types package="specific.package.name.B">
<composite name="futuresPrice">
<type name="mantissa" primitiveType="int64" />
<type name="exponent" primitiveType="int8" />
<ref name="isSettlement" type="booleanEnum" offset="10" />
</composite>
</types>
Yes the <ref>
case needs to be considered.
When do you think you can address this?
Apologies, got sick for the past week, still on meds. Fingers cross - this week.
please have a look on https://github.com/real-logic/simple-binary-encoding/pull/915