-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell/hoogle.nix: make an empty packages list possible #20619
Conversation
@Profpatsch, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cstrahan, @oxij and @mdorman to be potential reviewers. |
@@ -51,21 +51,19 @@ let | |||
else writeText "ghcjs-prologue.txt" '' | |||
This index includes documentation for many Haskell modules. | |||
''; | |||
|
|||
docPackages = (lib.closePropagation packages); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose those brackets are no longer necessary.
I'm not fond of the warning. If we consider |
41b9440
to
8b68e0e
Compare
You are right. I also noticed |
Very cool. Once #20619 (comment) is addressed, I'd be happy to merge. |
Building hoogle environments with an empty list of packages threw a built-time error. This was particularly confusing when giving e.g. `(hps: [hps.Cabal])` which, since `Cabal` is set to `null` (because it’s a distribution package), would have lead to the same error as an empty list. It was not useful to throw an error at all, because sometimes one only wants to build an environment for the distribution packages; also the default value for packages wasn’t even a valid value, so it is removed.
8b68e0e
to
b8a69aa
Compare
Right, fixed. |
Building hoogle environments with an empty list of packages threw a built-time
error. This was particularly confusing when giving e.g.
(hps: [hps.Cabal])
which, since
Cabal
is set tonull
(because it’s a distribution package),would have lead to the same error as an empty list.
It was not useful to throw an error at all, because sometimes one only wants to
build an environment for the distribution packages. We switch to displaying a
warning (because it might be that the user made a mistake).
cc @peti @cstrahan