Skip to content
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

Create dependency output tasks, consume in module stats and skippy #308

Open
ZacSweers opened this issue Apr 1, 2023 · 4 comments
Open
Labels
enhancement New feature or request skippy

Comments

@ZacSweers
Copy link
Collaborator

Currently we have two different implementations for computing dependencies.

  1. Module stats computes shallow dependencies from explicit build file declarations.
  2. Skippy uses SerializableDependencyGraph, which uses a subset of configurations and appears to also only just be shallow dependencies.

A new solution would be to unify these solutions and use the fully resolved graph for both. Using focus's approach seems good. We could then make a task that writes these to an output file and then aggregate them in module and skippy tasks. This would also obviate the need for declaring an explicit set of configurations to consume, as we could dynamically consume all of them.

@ZacSweers ZacSweers added the enhancement New feature or request label Apr 1, 2023
@ZacSweers
Copy link
Collaborator Author

The output format could just be a simple json

{
  ":path:to:project": [
    ":path:to:dep1",
    ":path:to:dep2"
  ],
  ":path:to:project2": [
    ":path:to:dep3",
    ":path:to:dep4"
  ]
}

@ZacSweers
Copy link
Collaborator Author

When we load all the json files in the later tasks. That should plug in easily to the jgraph building we already do in module stats, and easy enough to replicate (either with jgraph or with guava's graph support) in skippy

@ZacSweers
Copy link
Collaborator Author

Slight modification to the format: we should collect configuration names too. This would help with cases like #309

{
  ":path:to:project": [
    { "path": ":path:to:dep1", "configuration": "implementation" }
  ]
}

@ZacSweers
Copy link
Collaborator Author

This could also possibly be useful https://github.com/adammurdoch/dependency-graph-as-task-inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request skippy
Projects
None yet
Development

No branches or pull requests

1 participant