Skip to content

Commit

Permalink
Back out "Fix call to attr_deps_haskell_lib_infos"
Browse files Browse the repository at this point in the history
Summary:
Original commit changeset: e070f40b02c8

Original Phabricator Diff: D52778012

Reverting because it breaks haxlsh

Differential Revision: D52799222

fbshipit-source-id: 894b7c5b2d34cc92b9e97541311ddc118db129e8
  • Loading branch information
Pepe Iborra authored and facebook-github-bot committed Jan 16, 2024
1 parent 7ca5e91 commit c751707
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prelude/haskell/haskell.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ load(
load(
"@prelude//haskell:util.bzl",
"attr_deps",
"attr_deps_haskell_link_infos",
"attr_deps_haskell_link_infos_sans_template_deps",
"attr_deps_merged_link_infos",
"attr_deps_profiling_link_infos",
"attr_deps_shared_library_infos",
Expand Down Expand Up @@ -628,7 +628,7 @@ def haskell_library_impl(ctx: AnalysisContext) -> list[Provider]:
preferred_linkage = Linkage("static")

# Get haskell and native link infos from all deps
hlis = attr_deps_haskell_link_infos(ctx)
hlis = attr_deps_haskell_link_infos_sans_template_deps(ctx)
nlis = attr_deps_merged_link_infos(ctx)
prof_nlis = attr_deps_profiling_link_infos(ctx)
shared_library_infos = attr_deps_shared_library_infos(ctx)
Expand Down
10 changes: 10 additions & 0 deletions prelude/haskell/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ def attr_deps_haskell_link_infos(ctx: AnalysisContext) -> list[HaskellLinkInfo]:
],
)

# DONT CALL THIS FUNCTION, you want attr_deps_haskell_link_infos instead
def attr_deps_haskell_link_infos_sans_template_deps(ctx: AnalysisContext) -> list[HaskellLinkInfo]:
return filter(
None,
[
d.get(HaskellLinkInfo)
for d in attr_deps(ctx)
],
)

def attr_deps_haskell_lib_infos(
ctx: AnalysisContext,
link_style: LinkStyle,
Expand Down

0 comments on commit c751707

Please sign in to comment.