what is FilesToRun.runfiles_manifest useful for?

42 views
Skip to first unread message

Benjamin Peterson

unread,
Jun 1, 2018, 1:25:11 AM6/1/18
to bsilve...@gmail.com, baze...@googlegroups.com
FilesToRun.runfiles_manifest was exposed to Skylark in https://cr.bazel.build/1760. This attribute will be None, the build-runfiles input manifest artifact, or the build-runfiles output manifest artifact. (Which it is depends on your operating system and the state of the --experimental_enable_runfiles, --build_runfile_manifests, and --build_runfile_links options.)

In the code review exposing this attribute, it's asserted that the attribute is useful for distinguishing whether a target needs a runfiles tree of its own or simply contributes runfiles to its dependents. I don't think the runfiles_manifest attribute is necessary for that. Checking whether FilesToRun.executable is None or not should be sufficient, since targets have runfiles trees iff they are binaries.

A major wart of runfiles manifests is that they contain absolute paths. Therefore any action that depended on a non-None FilesToRun.runfiles_manifest attribute would be remotely uncachable.

I looked at some of the Skylark rules_* repositories on github.com/bazelbuild, and couldn't find any usage of this attribute. Should FilesToRun.runfiles_manifest be deprecated and removed?

Regards,
Benjamin
Reply all
Reply to author
Forward
0 new messages