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 "trait" relationship to selectors #384

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Conversation

mtdowling
Copy link
Member

A "trait" relationship allows selectors to traverse from shapes to the
the trait shapes applied to the shape. This can be used to query for
things like "services with no protocol traits", "deprecated traits that
are being used on shapes", "traits that aren't referenced by any
shapes", etc.

Trait relationships are not typically needed and add a lot of overhead.
As such, they are opt-in only and enabled in selectors by adding a named
"trait" directed relationship. They're also opt-in in code.

In order to pull this off, I updated the selector API to always require
a Model.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling requested a review from kstich April 17, 2020 06:56
A "trait" relationship allows selectors to traverse from shapes to the
the trait shapes applied to the shape. This can be used to query for
things like "services with no protocol traits", "deprecated traits that
are being used on shapes", "traits that aren't referenced by any
shapes", etc.

Trait relationships are not typically needed and add a lot of overhead.
As such, they are opt-in only and enabled in selectors by adding a named
"trait" directed relationship. They're also opt-in in code.

In order to pull this off, I updated the selector API to always require
a Model.
@mtdowling mtdowling force-pushed the add-trait-relationship branch from 4da0f12 to 1d496c5 Compare April 17, 2020 17:03
@mtdowling mtdowling merged commit 2106393 into 0.10 Apr 17, 2020
@mtdowling mtdowling deleted the add-trait-relationship branch April 23, 2020 02:18
@kstich kstich mentioned this pull request Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants