You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support queries to detect whether a trait ID matches a trait, ignoring version.
Why
The work in OpenAssetIO/OpenAssetIO-MediaCreation#64 developed a strategy for versioning of traits. This works by changing the unique ID of a trait to include a version number. This means that detecting if a trait set contains a trait, where the version is not important, means testing every version of the trait until one matches.
Hosts/managers are likely to want to branch at a high level based on traits, and not initially care what version they are.
There is a danger hosts/managers will work around this by abusing the format of the trait ID, i.e. to strip off the version tag. However, the trait ID should be viewed as opaque by consumers.
So at minimum we need a way to test if a single string ID is a given trait, ignoring version.
Notes
As an extension, version-agnostic trait set/data container queries could be added for convenience. Changes to TraitsData might be needed to do this efficiently.
A useful knock-on effect of this could allow specification trait sets to be version agnostic (though constructing a trait via a Specification view class would of course still need to choose a version).
The text was updated successfully, but these errors were encountered:
What
Support queries to detect whether a trait ID matches a trait, ignoring version.
Why
The work in OpenAssetIO/OpenAssetIO-MediaCreation#64 developed a strategy for versioning of traits. This works by changing the unique ID of a trait to include a version number. This means that detecting if a trait set contains a trait, where the version is not important, means testing every version of the trait until one matches.
Hosts/managers are likely to want to branch at a high level based on traits, and not initially care what version they are.
There is a danger hosts/managers will work around this by abusing the format of the trait ID, i.e. to strip off the version tag. However, the trait ID should be viewed as opaque by consumers.
So at minimum we need a way to test if a single string ID is a given trait, ignoring version.
Notes
As an extension, version-agnostic trait set/data container queries could be added for convenience. Changes to
TraitsData
might be needed to do this efficiently.A useful knock-on effect of this could allow specification trait sets to be version agnostic (though constructing a trait via a Specification view class would of course still need to choose a version).
The text was updated successfully, but these errors were encountered: