-
Notifications
You must be signed in to change notification settings - Fork 229
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(#556): added check circular dependencies #772
base: main
Are you sure you want to change the base?
feat(#556): added check circular dependencies #772
Conversation
Does anyone have comments on this? Is it good, or do I need to change this commit? |
@renanbastos93, thanks for the PR. Few comments:
|
awesome, i will use that. Thanks a lot soon i will do a new commit. |
Refactored the code to use the internal graph of the library instead of relying on third-party libraries to validate cyclic imports between components. This improves maintainability and reduces unnecessary dependencies. Also, added unit tests to ensure the validation works correctly. - Uses the library's internal graph to validate cyclic imports between components - Removes dependency on third-party libraries for this functionality - Adds unit tests to ensure the accuracy of the validation - Adjusts the code according to the code review suggestions
…e direct method to do has cycle
@rgrandl done, check please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply on this, Renan.
In dfs.go, we have a dfs function that does a DFS traversal of the graph already. Is it possible to modify that function to detect cycles instead of implementing another traversal?
No worries! I can do this, but I will need more time because I've started a new job and my free time has been limited. |
Added validation to ensure that dependencies do not form circular dependencies.
An error is raised if such a condition is detected.
ISSUE: #556
Repository reference to simulate it: https://github.com/renanbastos93/weaver-issue-556