Provide command to export dependency graph
KristianAN opened this issue · comments
BSP has an interface for exporting information about dependencies and metadata about said dependencies including transitive dependencies: https://build-server-protocol.github.io/docs/specification/#buildtargetdependencymodules-request.
If we could get this information from bleep it should be "trivial" to build integrations with various CI/Security tooling such as github security.
An example for sbt: https://github.com/scalacenter/sbt-dependency-submission
I think for general adoption this is probably a quite important feature as orgs increasingly demand such integrations.
This is maybe also information we can get from coursier?
Oh yes, absolutely. Coursier resolves all dependencies and we use that to build project definitions for bloop.
You can dump those with bleep build show bloop <projectGlobs>
for instance
With yq
and Bash you could do
cs resolve -t $(yq eval '.projects.main.dependencies[]' bleep.yaml)
where main
is the module name. That will at least give you a tree, though not a graph.
You could replace main
with *
. In my case I got an error, probably because I'd have to expand ${BLEEP_VERSION}
.