SNARK-71: better path using
This commit is contained in:
parent
a411849d6f
commit
06bcdbd489
@ -22,13 +22,14 @@ public suspend fun buildDependencyGraph(root: Directory): DependencyGraph {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun buildNodes(folder: Directory, nodes: HashMap<FileName, DependencyGraphNode>) {
|
private suspend fun buildNodes(folder: Directory, nodes: HashMap<FileName, DependencyGraphNode>) {
|
||||||
assert(!nodes.containsKey(folder.getPath()))
|
val pathString = folder.getPath().pathString
|
||||||
|
|
||||||
|
assert(!nodes.containsKey(pathString))
|
||||||
|
|
||||||
val path = folder.getPath()
|
|
||||||
val rootDcoument = folder.get(DEFAULT_DOCUMENT_ROOT)
|
val rootDcoument = folder.get(DEFAULT_DOCUMENT_ROOT)
|
||||||
nodes.put(path, buildDependencyGraphNode(rootDcoument.readAll()))
|
nodes.put(pathString, buildDependencyGraphNode(rootDcoument.readAll()))
|
||||||
|
|
||||||
val dependencies = getDependencies(nodes.getValue(path))
|
val dependencies = getDependencies(nodes.getValue(pathString))
|
||||||
|
|
||||||
for (dependency in dependencies) {
|
for (dependency in dependencies) {
|
||||||
if (!nodes.containsKey(dependency))
|
if (!nodes.containsKey(dependency))
|
||||||
|
Loading…
Reference in New Issue
Block a user