Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include_runfiles with runfiles shared by multiple sources #902

Open
max-heller opened this issue Nov 21, 2024 · 0 comments
Open

include_runfiles with runfiles shared by multiple sources #902

max-heller opened this issue Nov 21, 2024 · 0 comments

Comments

@max-heller
Copy link

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:

rules_pkg/pkg/mappings.bzl

Lines 307 to 313 in 5c6aec6

have_it = src_dest_paths_map.get(rf)
if have_it:
if have_it != dest_path:
# buildifier: disable=print
print("same source mapped to different locations", rf, have_it, dest_path)
else:
src_dest_paths_map[rf] = dest_path

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant