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

feat(common): check dependecy in decorators #126

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

muhabdulkadir
Copy link
Contributor

@muhabdulkadir muhabdulkadir commented Sep 18, 2024

Closes #<125>

Changes

  • Add decorator type references on declarations and properties to the dependency graph.

Screenshots or Video

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

lib/common/diagramvisitor.js Outdated Show resolved Hide resolved
lib/common/diagramvisitor.js Outdated Show resolved Hide resolved
lib/common/graph.js Show resolved Hide resolved
lib/common/graph.js Outdated Show resolved Hide resolved
test/codegen/fromcto/plantuml/plantumlvisitor.js Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Sep 19, 2024

Coverage Status

coverage: 98.763% (-0.02%) from 98.78%
when pulling acf9357 on muhabdulkadir:main
into c611435 on accordproject:main.

Signed-off-by: muhammed-abdulkadir <[email protected]>
Signed-off-by: muhammed-abdulkadir <[email protected]>
@mttrbrts mttrbrts merged commit 0155ee2 into accordproject:main Sep 20, 2024
11 checks passed
const fqn = modelFile.getFullyQualifiedTypeName(argument.name);
if (fqn) {
parameters.graph.addVertex(fqn);
(parent === modelFile) ? parameters.graph.addEdge(parent.getNamespace(), fqn) : parameters.graph.addEdge(parent.getFullyQualifiedName(), fqn);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(parent === modelFile) ? parameters.graph.addEdge(parent.getNamespace(), fqn)

This allows for a model decorated with a type reference to act as a vertex in a connected graph, causing it to be included when users search for subgraphs.

This behavior arises because we currently allow models to be decorated with type references, which implicitly suggests a composition. However, since we treat models as packages, we should avoid compositions on the packages themselves.

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.

5 participants