-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Hey 👋,
i've recognized that ExternalDeclaration cardinality isn't included in the sum of cardinalities of the DEPENDS_ON relationship between a Module and an ExternalModule. Everything else that Module declares or depends on seems to be included as i'd expect.
Here is a picture of an example from the analysis of ts-output-react-router.json with the example-query.cypher:
DEPENDS_ONrelationships are displayed with their cardinalities- The orange
ìndex.tsnode is theModule - The grey
history.tsnode is theExternalModule - The blue and green nodes are elemens that are declared by
Moduleand depend onExternalModule. Their cardinalities sum up to 4 which equals the cardinality betweenModuleandExternalModule. - The purple nodes are labeled
ExternalDeclaration. They are exported by theExternalModuleand used within theExternalModule. Their cardinalities (2x2=4) betweenModuleandExternalDeclarationare not included in the sum of cardinalities betweenModuleandExternalModule.
To rephrase that in cypher language 😀:
module_rel.cardinalityof(source:TS:Module)-[module_rel:DEPENDS_ON]->(target:TS:ExternalModule)contains the sum of cardinalities between those modules- The sum above contains all
element_rel.cardinalityof(source)-[:DECLARES]->(element)-[element_rel:DEPENDS_ON]->(target) - The sum above does not contain
declaration_rel.cardinalityof(source)-[declaration_rel:DEPENDS_ON]->(declaration:ExternalDeclaration)<-[:EXPORTS]-(target)
What is reason for leaving out external declaration dependencies between modules or is this unintentional?
Thank you very much 🙏,
Johannes
By the way: Awesome plugin for Typescript 👍. I'm trying to integrate it into my code-graph-analysis-pipeline.
Metadata
Metadata
Assignees
Labels
No labels