bazelbuild / bazelbuild/bazel

attr.output cannot create directories

Open
#14,647 7 comments 1 reaction 0 assignees View on GitHub
not stale P4 team-Rules-API type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

I would like to have a named output directory from a rule.

`attr.output` can create output attributes, but the outputs must always be files; they cannot be directories. That seems an artificial/unnecessary limitation.

I would like to support directories. Perhaps this could be an argument to `attr.output`. An argument `type` could be `"file"`, `"directory"`, or `"symlink"`.

Contributor guide

Open the contributing guide

Research direction

The issue identifies the attr.output API but names no implementation files or tests. Start by locating attr.output and its existing output-type handling, then determine how directory outputs should behave and verify support for file, directory, and symlink types.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.