Skip to content

buildall() does not work for simplest graph #3

@noblige

Description

@noblige

i, dep = queue.pop(0)
should this have roots added to the list? E.g.:

            ...
            i, dep = queue.pop(0)
            marks[dep] = i
            ...

Otherwise I'm not seeing any code that would produce items that don't have any parents?
Simple code:

from depgraph import Dataset, buildall
parent = Dataset('parent-does-not-exists', tool=None)
child = Dataset('child-does-not-exists', tool=None)
child.dependson(parent)
for stage in buildall(child):
    for dep, reason in stage:
        print("Building {0} with {1} because {2}".format(dep.name, dep.tool, reason))

Output only builds child, not the parent:

Building child-does-not-exists with None because the dataset doesn't exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions