Skip to content

Commit

Permalink
Clean up outdated comments in transform_deps. (#1150)
Browse files Browse the repository at this point in the history
Co-authored-by: cfredric <cfredric@chromium.org>
  • Loading branch information
cfredric and cfredric committed Feb 22, 2022
1 parent 14f48e7 commit 34cc2e9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions rust/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -378,19 +378,16 @@ def is_exec_configuration(ctx):
return ctx.genfiles_dir.path.find("-exec-") != -1

def transform_deps(deps):
"""Conditionally transform a [Target] into [DepVariantInfo].
"""Transforms a [Target] into [DepVariantInfo].
This helper function is used to transform ctx.attr.deps and ctx.attr.proc_macro_deps into
[DepVariantInfo] when --//rust/settings:incompatible_make_rust_providers_target_independent
is set to true (https://github.com/bazelbuild/rules_rust/issues/966).
Do not rely on this function - it will be removed after the flag is flipped.
[DepVariantInfo].
Args:
deps (list of Targets): Dependencies comming from ctx.attr.deps or ctx.attr.proc_macro_deps
deps (list of Targets): Dependencies coming from ctx.attr.deps or ctx.attr.proc_macro_deps
Returns:
list of DepVariantInfos if --//rust/settings:incompatible_make_rust_providers_target has
been flipped, list of Targets otherwise.
list of DepVariantInfos.
"""
return [DepVariantInfo(
crate_info = dep[CrateInfo] if CrateInfo in dep else None,
Expand Down

0 comments on commit 34cc2e9

Please sign in to comment.