-
Notifications
You must be signed in to change notification settings - Fork 7
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
Dependency tree #29
Dependency tree #29
Conversation
creates a dependency graph stored as an object of tuples named packages. See function 'graph_tests' for details on usage. Insource is to designate packages in and outside of source repositories.
-keep package lists unique. -check_pkg_dependencies was removed as it will be handled by the graph class.
-remove check_pkg_dependencies -build out the dependency graph recursively -print dependency trees for all packages in source space -filter out packages that will not be used. -remove resolve_dependencies as it will be handled by create_dependency_graph
-used a visted set to manage circular dependencies
This is the output I get using this branch for https://github.com/kobbled/rossum-test:
|
Thanks for the PR. I haven't checked the code in any detail yet (I will do so later), but I'm curious: in order to avoid infinite recursion, would keeping a "visited"-list and breaking the recursion (when the dependency resolver encounters a dependency it's already visited) achieve the same result without changing to a tree structure? This is not a 👎 for this PR. I'm just trying to make sure I understand the issue you describe in #28 and the solution your propose here. |
Could you contribute 320f8c3 in a separate PR? :) |
I was wondering that myself as I have rewritten this a few times now trying to locate the problem, which led me down the depth first search algorithm and why the PR seems verbose. I will try and check this in the next few days, and maybe submit some separate pull requests along with 320f8c3. |
Things I was trying to achieve was reduce redundancies in searches, such as searching through manifest files of packages that are not related to the source directory. It is not shown in the output, but for extra external paths it will remove packages not related to the source packages. Definitely haven't seen performance problems, I am just thinking what the debug output for 100 packages would be like. |
I'm closing this PR. Modifying only resolve_includes(), and resolve_includes_for_pkg() seems to have solved the issue. 320f8c3 is a warning for python3 it might conflict with python2 instances. I will open an issue to see if you want to change it at all. |
This is my proposed solution to issue #28