-
Notifications
You must be signed in to change notification settings - Fork 25
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: return depgraph from plugin #159
Conversation
96cf604
to
dd01624
Compare
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.
nice one @admons 🎉
.then(async (result) => { | ||
const dependencyGraph = result.dependencyGraph; | ||
const pkg = await depGraphLib.legacy.graphToDepTree( | ||
dependencyGraph, | ||
'pip' | ||
); | ||
t.ok(pkg.dependencies, 'does not error'); |
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.
these are a bit cheeky assertions haha, but lgtm
28b21d7
to
35f3749
Compare
this change will return a depgraph instead of a deptree from the plugin because a package can only have one version, it doesn't make sense to create it more than once in "pip_resolve.py" script this change will remove the duplicates from the scripts and replace them with a "true" value later the "buildDepGraph" function will iterate over the tree and replace all "true" values with a reference to the original package this will improve performance for those reasons: 1. no serializing dep tree with repeating dependencies 2. no deserializing repeating dependencies (memory and cpu affects) 3. return a depGraph
35f3749
to
d58d135
Compare
🎉 This PR is included in version 1.21.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In #159 we introduced a change to use dep graph instead of dep tree In specific scenarios, we see a direct dependency more than once for a specific package. This change will make sure we're setting it correctly
In #159 we introduced a change to use dep graph instead of dep tree In specific scenarios, we see a direct dependency more than once for a specific package. This change will make sure we're setting it correctly
In #159 we introduced a change to use dep graph instead of dep tree In specific scenarios, we see a direct dependency more than once for a specific package. This change will make sure we're setting it correctly
In #159 we introduced a change to use dep graph instead of dep tree In specific scenarios, we see a direct dependency more than once for a specific package. This change will make sure we're setting it correctly
What does this PR do?
this change will return a depgraph instead of a deptree from the plugin