Skip to content

Directory traversal is depth-first instead of breadth-first #44

@ariel-miculas

Description

@ariel-miculas

walker in builder/src/lib.rs says:

breadth first search for sharing, don't cross filesystems just to be safe, order by file name.

It's also mentioned in doc/chunking.md:

We serialize the filesystem by doing a breadth first walk, ordering directory
entries lexicographically. We use a breadth first search so that hopefully
package directories can be shared.

but https://docs.rs/walkdir/latest/walkdir/struct.WalkDir.html traverses the directory in depth-first fashion.

Furthermore, it doesn't provide support for breadth-first search:
BurntSushi/walkdir#16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions