DDS-XTypes 1.4b1 RTF Avatar
  1. OMG Issue

DDSXTY14 — Assignability riles for unions are brittle and restrictive

  • Key: DDSXTY14-107
  • Status: open  
  • Source: Real-Time Innovations ( Dr. Gerardo Pardo-Castellote, Ph.D.)
  • Summary:

    The assignability rules for unions require matching or the member_id. By default these are assigned sequentially so a union that just reorders the cases becomes incompatible.

    This seems overly restrictive. It could be overcome if we said that the default autoid for union is @autoid("HASH") or, alternative, have unions by default be treated as if ignore member names had been set on the DataReader.
    We could also change assignability rules to not be dependent on memberId only on the branch selected by the discriminator.
    This change will not break existing systems since it is a more relaxed compatibility rule.

    However note that the member ID is serialized for "mutable" unions.
    This seems another odd thing since this makes them "harder to evolve" than the append-able ones. Removing them would be an incompatible change, but ignoring them during type compatibility should OK.

  • Reported: DDS-XTypes 1.3b1 — Tue, 26 Aug 2025 16:19 GMT
  • Updated: Tue, 26 Aug 2025 16:34 GMT