Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version-agnostic trait detection #84

Open
feltech opened this issue Jun 11, 2024 · 2 comments
Open

Add version-agnostic trait detection #84

feltech opened this issue Jun 11, 2024 · 2 comments

Comments

@feltech
Copy link
Member

feltech commented Jun 11, 2024

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).

@feltech
Copy link
Member Author

feltech commented Jun 11, 2024

This request came up during the TSC.

@feltech
Copy link
Member Author

feltech commented Jun 20, 2024

Blocked on #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant