Skip to content

Commit

Permalink
prelude/python: remove landmine
Browse files Browse the repository at this point in the history
Summary:
`deps` and `raw_deps` are two different things within this function, and the renaming causes a lot of confusion here.
Delet.

Reviewed By: IanChilds, yhcharles

Differential Revision: D68101673

fbshipit-source-id: 62e4b9ed09b69171e85733af6316cbc78e91e5e1
  • Loading branch information
zsol authored and facebook-github-bot committed Jan 14, 2025
1 parent fc3f4cc commit 62a4b60
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions prelude/python/python_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -400,34 +400,33 @@ def python_library_impl(ctx: AnalysisContext) -> list[Provider]:
providers.append(DefaultInfo(sub_targets = sub_targets))

# Create, augment and provide the linkable graph.
deps = raw_deps
linkable_graph = create_linkable_graph(
ctx,
node = create_linkable_graph_node(
ctx,
# Add in any potential native root targets from our first-order deps.
roots = get_roots(deps),
roots = get_roots(raw_deps),
# Exclude preloaded deps from omnibus linking, to prevent preloading
# the monolithic omnibus library.
excluded = get_excluded(
deps = (
(deps if _exclude_deps_from_omnibus(ctx, qualified_srcs) else []) +
(raw_deps if _exclude_deps_from_omnibus(ctx, qualified_srcs) else []) +
# We also need to exclude deps that can't be re-linked, via
# the `LinkableRootInfo` provider (i.e. `prebuilt_cxx_library_group`).
[d for d in deps if LinkableRootInfo not in d]
[d for d in raw_deps if LinkableRootInfo not in d]
),
),
),
deps = deps,
deps = raw_deps,
)
providers.append(linkable_graph)

# Link info for native python
providers.append(
merge_cxx_extension_info(
ctx.actions,
deps,
shared_deps = deps,
raw_deps,
shared_deps = raw_deps,
),
)

Expand Down

0 comments on commit 62a4b60

Please sign in to comment.