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)
| 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.) |
| 20 | func 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. |
| 30 | func BuildDependencyGraphWithResolver( |