-
Notifications
You must be signed in to change notification settings - Fork 121
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
Use resolved parent for resolving children in normalizer #381
base: master
Are you sure you want to change the base?
Use resolved parent for resolving children in normalizer #381
Conversation
If we think this is a good addition, I'm willing to add some unit tests! |
// fix version of current entry | ||
.updated(node, newItems) | ||
// update all children | ||
.mapValues(_.filter { case (parent, _) => |
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.
the intent seems good, but I think this algorithm is quadratic in the number of nodes.
Going from O(N) to O(N^2) here could be a deal breaker for many repos.
I think we could keep it O(N * E) (where E is the average number of edges nodes) if we use the Graph[N, E]
data structure which can look up quickly edges that have a given source or destination. The input graph
starts with that, but we may need to update that graph
as we modify to use this algorithm.
I'm happy to merge something like this with some tests and as long we don't think we have any quadratic behavior.
Thanks for working on this.
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.
Yeah, this is just a prototype to show what would happen. If we agree that this might be a good direction I could try to make it perform better.
Update: we consider to change to |
Thanks for the update. BTW: maven_install seems like a good choice. I think the main benefit of Bazel-deps is that it has better scala support. For scala you don't want to run ijar in libraries that have macros or they will fail. If you don't use scala or leverage any of the customization that Bazel-deps offers I think maven_install could be a fine choice. |
As far as I know |
Update: for now we went with |
A potential solution to #379 by not allowing an evicted version to have effect on selecting a version of its children.