Skip to content

Commit

Permalink
Migrate back to cquery/uquery
Browse files Browse the repository at this point in the history
Summary: Migrate back to `cquery()`, now that the cell alias resolution has been fixed within BXL

Reviewed By: scottcao

Differential Revision: D43834953

fbshipit-source-id: a16dded23636c2d6347cb13b392efb2a680376fb
  • Loading branch information
wendy728 authored and facebook-github-bot committed Mar 13, 2023
1 parent 953d6de commit fa314dc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion omnibus_tools/find_exclusions.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _find_exclusions_impl(ctx):
"ovr_config//platform/linux:x86_64-fbcode-platform010-clang"
)

cquery = ctx.cquery_legacy(platform)
cquery = ctx.cquery(platform)

# Note: ideally we'd just do all of third-party here, but there are some
# targets files that don't parse there, so for now this adds ucc ad-hoc,
Expand Down
2 changes: 1 addition & 1 deletion omnibus_tools/find_implicit_roots.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _find_implicit_roots(ctx):
"ovr_config//platform/linux:x86_64-fbcode-platform010-clang"
)

targets = ctx.cquery_legacy(platform).eval("kind('^python_(binary|test)', %s)", query_args = [ctx.cli_args.targets])
targets = ctx.cquery(platform).eval("kind('^python_(binary|test)', %s)", query_args = [ctx.cli_args.targets])
targets = _flatten(targets.values())
all_analysis = ctx.analysis([configured_sub_target(t.label, "omnibus") for t in targets])

Expand Down
4 changes: 2 additions & 2 deletions prelude/erlang/shell/shell.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def _deduped_paths(paths):
}.values())

def _ebin_paths(ctx):
test_target = ctx.cquery_legacy().kind("erlang_test", ctx.cquery_legacy().owner(ctx.cli_args.source))
app_target = ctx.cquery_legacy().kind("erlang_app$", ctx.cquery_legacy().owner(ctx.cli_args.source))
test_target = ctx.cquery().kind("erlang_test", ctx.cquery().owner(ctx.cli_args.source))
app_target = ctx.cquery().kind("erlang_app$", ctx.cquery().owner(ctx.cli_args.source))

target = test_target + app_target

Expand Down
2 changes: 1 addition & 1 deletion prelude/python/sourcedb/classic.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load(":merge.bxl", "do_merge")
load(":query.bxl", "do_query")

def _build_entry_point(ctx: "bxl_ctx") -> None:
query = ctx.cquery_legacy()
query = ctx.cquery()
actions = ctx.bxl_actions.action_factory()
targets = do_query(ctx, query, actions, [query.eval(target) for target in ctx.cli_args.target])
built_sourcedbs = do_build(ctx, targets)
Expand Down
2 changes: 1 addition & 1 deletion prelude/python/sourcedb/code_navigation.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load(":merge.bxl", "do_merge")
load(":query.bxl", "do_query")

def _build_entry_point(ctx: "bxl_ctx") -> None:
query = ctx.cquery_legacy()
query = ctx.cquery()
actions = ctx.bxl_actions.action_factory()
root = ctx.root()

Expand Down
2 changes: 1 addition & 1 deletion prelude/python/sourcedb/query.bxl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def do_query(
return _expand_and_filter_dependencies(ctx, actions, root_targets)

def _do_query_entry_point(ctx: "bxl_ctx") -> None:
targets = do_query(ctx, ctx.cquery_legacy(), ctx.bxl_actions.action_factory(), ctx.cli_args.target)
targets = do_query(ctx, ctx.cquery(), ctx.bxl_actions.action_factory(), ctx.cli_args.target)
ctx.output.print_json([target.raw_target() for target in targets])

query = bxl(
Expand Down

0 comments on commit fa314dc

Please sign in to comment.