bazelbuild / bazelbuild/rules_pkg

`include_runfiles` with runfiles shared by multiple sources

Open
#902 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
253
Forks
221
Avg merge
10h 33m
Merged PRs (30d)
1

Description

The `include_runfiles` behavior for `pkg_files` breaks down if multiple sources include the same runfile. For instance, if two sources `foo` and `bar` include a runfile `blob.txt`, only `foo` will get `blob.txt` in its runfiles. A warning is emitted here and the runfile is not mapped for `bar`:
https://github.com/bazelbuild/rules_pkg/blob/5c6aec64627c91f8ae71820173766237311d4ac6/pkg/mappings.bzl#L307-L313

The behavior I'd expect is that the runfile is mapping inside of `foo.runfiles` and `bar.runfiles`, either as a duplicate copy of the same file or perhaps a link to some single copy in the package.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.