Skip to content

Feature Request: directory should support TreeArtifactsΒ #566

@thesayyn

Description

@thesayyn

The new directory and subdirectory rules seem to only accept regular files. While this works well for sysroots (only usage of these new rules i can find) that are extracted during loading phase, it does not work if the sysroot archives kept intact as an archive and only extracted during execution phase when actually needed.

I am proposing that we add support for sources that are ctx.actions.declare_directory and support globbing over them. This is probably not possible due to how TreeArtifacts works so i am not sure how this can be implemented without the help of Bazel core.

bazel-lib has a similar rule https://github.com/bazel-contrib/bazel-lib/blob/main/docs/directory_path.md it only supports "plucking" a file nested within treeartifacts but it only works if the consumer rule checks the DirectoryPathInfo (which i believe similar to what directory rule does)

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