-
Notifications
You must be signed in to change notification settings - Fork 3
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
support multiple inheritance #64
Comments
Note that it's currently pretty trivial to evaluate a predicate across a given schema version's ancestry: function has_matching_ancestor(predicate, sv::Legolas.SchemaVersion)
predicate(sv) && return true
p = Legolas.parent(sv)
isnothing(p) && return false
predicate(p) && return true
return has_matching_ancestor(predicate, p)
end If we implement this, stuff like this will turn into a tree walk, which is just complicated enough that it might be worth providing some utilities around |
I think this should just be
In Julia, the syntax would be: @version FooV1 > [BarV1, BazV1] begin
....
end |
Need to make sure we do this in a non-breaking way, and develop good recommendations around how to use this new power for good rather than evil. |
when authoring a new schema version, it is not uncommon to want to inherit the required fields of two or more unrelated (in lineage) schema versions
This should be quite feasible/straightforward in Legolas-land, as long as we:
The text was updated successfully, but these errors were encountered: