atlassian / bazel-tools

Reusable bits for Bazel
Apache License 2.0
113 stars 36 forks source link

multirun: propagate the entire runfiles of dependencies #54

Closed kevingessner closed 5 years ago

kevingessner commented 5 years ago

runfiles can include more than just transitive_files, such as empty_filenames. The best way to ensure all parts of runfiles are propagated is to use merge so Bazel takes care of every property.

This fixes commands that call out to py_binary, for instance, which relies on empty_filenames.

ash2k commented 5 years ago

This stuff is so poorly documented... Thanks for fixing it! So with this fix it works for some use case that you have?

Can you sign the CLA please? https://github.com/atlassian/bazel-tools#contributing

kevingessner commented 5 years ago

Yeah, this fixes a case where command points to a py_binary, which uses the empty_filenames list to create __init__.py files (https://docs.bazel.build/versions/master/be/python.html#py_binary.legacy_create_init). If those runfiles aren't propagated, the command won't work right.

CLA signed!

kevingessner commented 5 years ago

thank you!