Repository navigation
feat(DocumentQueries): WhereType takes exact, to keep only the elements whose own metaclass is named - #15
Merged
Conversation
…ts whose own metaclass is named Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
6 tasks done
Contributor
Author
|
Runtime coordination (for the Review flag on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WhereType(type = "PartUsage")keeps every element conforming to the type — subclasses of the metaclass and the model's own definitions/usages alike — which is the right default for a cookbook query and the wrong one for a reflective walk, where each element must be mirrored under exactly one metaclass (Open-MBEE/qvtsreflection.sysml, generated per concrete metaclass from the metamodel table).Same shape as
tolerateonProject/WhereFeature(#14): an optional Boolean with its default, so no existing query changes meaning;.meta.jsonregenerated.Runtime, coordinated: Open-MBEE/OpenSysML#1689 implements it (
queryexec.evaluateWhereTypekeeps a row whenMetamodelTypeNameOf(sym) == typeunderexact, with its test) and vendors this branch's commit; it is a draft pinned tob6784f23until this PR merges, then re-pins to main's merge commit and un-drafts.Semver impact: MINOR. An added
inparameter with a default is backward compatible: every existingWhereTypeinvocation parses and means what it meant, andengine-contract.jsonis unchanged (WhereTypeis listed by name, its parameters are not part of the contract), socontractis not bumped. An engine built against the previous pin rejectsexact = trueas an unknown parameter rather than mis-evaluating it, which is the failure mode a MINOR bump allows.Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette