real-logic / simple-binary-encoding

Simple Binary Encoding (SBE) - High Performance Message Codec
Apache License 2.0
3.12k stars 523 forks source link

[Java][Question] sharing common types across modules #1017

Closed k5924 closed 4 weeks ago

k5924 commented 4 weeks ago

Hi, Hoping this is the correct place to ask this question.

Context:

Lets say I have common-types being pulled into a schema as described here.

If I have another schema in the same project (separate module) and in common-types, right now the common types are generated alongside the definitions in the schema.xml for both modules in each modules build folder.

Question:

Is there a way to use the generated common-types across modules without regenerating them in each modules build folder?

I was looking through previous GitHub issues where I found these issues and was wondering if anything has changed since then? https://github.com/real-logic/simple-binary-encoding/issues/581 https://github.com/real-logic/simple-binary-encoding/issues/752

Would really appreciate any advice. Thanks in advance

vyazelenko commented 4 weeks ago

@k5924 As mentioned in those other issues this feature requires v2 of the SBE spec which was not finalized yet. However, SBE already support a draft version which has a feature to override package where the types are generated. See #507 and explicit-package-test-schema.xml. This feature must be explicitly enabled via sbe.types.package.override property.