Skip to content

Don't reclone and rebuild duplicate dependencies #82

Open
@tionis

Description

@tionis

Currently, when I have duplicate dependencies in my recursive dependency graph they are built multiple times. I suggest building the dependency tree first, and then maybe apply the algorithm in jpm/dag to build each only exactly once.
Example:

  • Project A deps: [B, spork, C]
  • Project B deps: [spork]
  • Project C deps: [B]
    which results in the following graph:
graph
    a-->b
    a-->spork
    a-->c
    b-->spork
    c-->b
Loading

Which means the most optimal build process would be to
(0. fill cache by walking the graph and cloning new deps as needed)

  1. build spork
  2. build b
  3. build c
  4. build a

But currently it looks more like this:

  1. clone & build spork
  2. clone & build B
  3. clone & build spork
  4. clone & build spork
  5. clone & build B
  6. clone & build C
  7. clone & build A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions