~ $ stack hoogle Conduit
Run from outside a project, using implicit global project config
Using resolver: nightly-2016-08-06 from implicit global project's config file: /home/simon/.stack/global-project/stack.yaml
No Hoogle database yet. Automatically building haddocks and hoogle database (use --no-setup to disable) ...
Run from outside a project, using implicit global project config
Using resolver: nightly-2016-08-06 from implicit global project's config file: /home/simon/.stack/global-project/stack.yaml
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
It looks like stack hoogle tries to build the haddocks but has no build target. Given that one can e.g. open haddocks (with stack haddock --open) from the global project, maybe stack hoogle could detect when it's in the global project and skip the haddock generation step?
If having a local project is a strict requirement, stack hoogle should at least fail more gracefully in the global project.
(Ping @chrisdone)
BTW I have created a new label component: hoogle for issues with stack hoogle.
@chrisdone agrees that stack hoogle should be available in the global project:
From slack:
i agree we need a bit of special logic for the global case
Instead of special casing "global project", it should just be a special case for projects with no local packages.
I just ran into precisely this issue. Is there any word on how this might be fixed?
Most helpful comment
Instead of special casing "global project", it should just be a special case for projects with no local packages.