Skip to content

Commit

Permalink
move rust analyzer to native set
Browse files Browse the repository at this point in the history
Reviewed By: IanChilds

Differential Revision: D63842649

fbshipit-source-id: 8265717396a35e9ec1f90cdd3fa51025873757bf
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Oct 10, 2024
1 parent 4858924 commit c927733
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions prelude/rust/rust-analyzer/resolve_deps.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ load("@prelude//linking:link_info.bzl", "LinkStrategy")
load("@prelude//rust:build_params.bzl", "MetadataKind")
load("@prelude//rust:link_info.bzl", "RustLinkInfo")
load("@prelude//rust/rust-analyzer:provider.bzl", "RustAnalyzerInfo")
load("@prelude//utils:set.bzl", "set")
load("@prelude//utils:type_defs.bzl", "is_list")

TargetInfo = dict[str, typing.Any]
Expand Down Expand Up @@ -114,14 +113,17 @@ def cquery_deps(
ctx: bxl.Context,
top_targets: list[TargetLabel],
workspaces: list[TargetLabel]) -> dict[TargetLabel, TargetInfo]:
targets = set([])
targets = set()
target_universe = ctx.target_universe(top_targets).target_set()
analysis_set = ctx.analysis(target_universe)
for _target, analysis in analysis_set.items():
info = analysis.providers().get(RustAnalyzerInfo)
if info:
targets.update(info.transitive_target_set)
outputs = ctx.target_universe(targets.list()).target_set()
for target_set in info.transitive_target_set:
targets.add(target_set)

#TODO(romanp) support set as target_universe arg
outputs = ctx.target_universe(list(targets)).target_set()
out = {}

# Eagerly analyze targets
Expand Down

0 comments on commit c927733

Please sign in to comment.