Skip to content

Suggestion: Handle Minor versions #9

@uweschaefer

Description

@uweschaefer

It should be possible to handle minor versions without breaking existing code.
The contract for minor versions is, that changes are guaranteed to be downward-compatible.

Facilitating this knowledge, a conversion like this should be possible:

Prereq:

  • There is a Transformation registered from 3.1 to 4.0

Scenario a)

Input: message in version 3.2
Requested version: 4.0

  • As there is a 3.1->4.0 and a 3.2 can be treated as a 3.1, the transformation should be used.
    The downcast from existing 3.2 to 3.1 will be implicit (without any actual transformation)

Scenario b)

Input: message in version 3.0
Requested version: 4.0

  • The upcast from 3.0 to 3.1 will be implicit (without any actual transformation)

Scenario c)

Input: message in version 3.0
Requested version: 5.0

  • Transformation needs to fail, as there is no way to get from 4.0 to 5.0, and as it is a major update, it is not guaranteed to be a compatible one.

In General

  • If there are more than one possible path through the transformers, the shortest path wins.
  • If there are still more than one of equal length, the one that transforms a larger distance earlier, wins - where distance is Decimal of VersionTo - Decimal of VersionFrom (for example 3.2 -> 4.0 = 0.8 distance)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions