Skip to content

Commit

Permalink
Fix the haddock for external dependencies
Browse files Browse the repository at this point in the history
The way bazel handles providers for aspects apparently changed, and there
is no need to forward a provider in the aspect if the base rule already
defines it
  • Loading branch information
Théophane Hufschmitt committed Nov 14, 2018
1 parent 180ff47 commit 18b59c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion haskell/haddock.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _haskell_doc_aspect_impl(target, ctx):
# Packages imported via `//haskell:import.bzl%haskell_import` already
# contain an `HaddockInfo` provider, so we just forward it
if HaddockInfo in target:
return target[HaddockInfo]
return []

hs = haskell_context(ctx, ctx.rule.attr)

Expand Down
7 changes: 3 additions & 4 deletions haskell/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ let
query_haddock () {
echo -n '['
for FIELD in $(query_field "$@"); do
echo -n '"'
echo -n $(echo "$FIELD" | cut -d/ -f5-)
echo -n '*",'
echo -n "\"$(echo "$FIELD" | cut -d/ -f5-)*\","
echo -n "\"$(echo "$FIELD" | cut -d/ -f5-)/*\","
done
echo -n ']'
}
Expand Down Expand Up @@ -72,7 +71,7 @@ let
)
native.filegroup(
name = "html",
srcs = native.glob($(query_haddock haddock-html), exclude_directories=0),
srcs = native.glob($(query_haddock haddock-html), exclude_directories=1),
)
native.filegroup(
name = "interfaces",
Expand Down

0 comments on commit 18b59c3

Please sign in to comment.