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

Merge runfiles from transitive dependencies of rust_test crate attr #1487

Merged
merged 8 commits into from
Oct 7, 2022
3 changes: 3 additions & 0 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
@@ -1046,6 +1046,9 @@ def rustc_compile_action(
files = getattr(ctx.files, "data", []) + coverage_runfiles,
collect_data = True,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to attempt to remove it in this change? Or an isolated change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure I understand the implications of using "collect_data" here, so I left it alone.

)
if hasattr(ctx.attr, "crate"):
runfiles = runfiles.merge(ctx.attr.crate[DefaultInfo].default_runfiles)
runfiles = runfiles.merge(ctx.attr.crate[DefaultInfo].data_runfiles)

# TODO: Remove after some resolution to
# https://github.com/bazelbuild/rules_rust/issues/771