MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / BuildDependencyGraph

Function BuildDependencyGraph

depgraph/dependency_graph_builder.go:20–27  ·  view source on GitHub ↗

BuildDependencyGraph analyzes a list of files and builds a dependency graph containing only project imports (excluding package:/dart: imports for Dart, and standard library/external imports for Go). Only dependencies that are in the supplied file list are included in the graph. The contentReader fun

(filePaths []string, contentReader vcs.ContentReader)

Source from the content-addressed store, hash-verified

18// Only dependencies that are in the supplied file list are included in the graph.
19// The contentReader function is used to read file contents (from filesystem, git commit, etc.)
20func BuildDependencyGraph(filePaths []string, contentReader vcs.ContentReader) (DependencyGraph, error) {
21 ctx, err := buildDependencyGraphContext(filePaths, contentReader)
22 if err != nil {
23 return nil, err
24 }
25
26 return BuildDependencyGraphWithResolver(filePaths, NewDefaultDependencyResolver(ctx, contentReader))
27}
28
29// BuildDependencyGraphWithResolver builds a graph using the provided DependencyResolver implementation.
30func BuildDependencyGraphWithResolver(