Skip to content

stack haddock should always return location of index.html #781

@dbaynard

Description

@dbaynard

Hello,

I propose that stack haddock always finishes by printing the location of the index.html file.

It can be inconvenient tracking down the documentation produced by stack haddock while developing a package.

When the command produces documentation, the last line of the output is

Generating Haddock index in
/home/<user>/<projectDirectory>/.stack-work/install/<arch>/<resolver>/<compilerVersion>/doc/index.html

The last line would be useful when there is no new documentation generated.


Steps to reproduce:

  1. Run stack haddock
  2. Run stack haddock

Expected:

The second run produces something like

The Haddock index is already up to date in
/home/<user>/<projectDirectory>/.stack-work/install/<arch>/<resolver>/<compilerVersion>/doc/index.html

Actual:

The command prints nothing.


Here is the stack --version output

$ stack --version
Version 0.1.2.0

Here is the command I ran with --verbose

$ stack haddock --verbose
Version 0.1.2.0
<date> <time>: [debug] Checking for project config at: /home/<user>/<projectDirectory>/stack.yaml @(stack_B8v5I05cffp30g7yBizAuN:Stack.Config src/Stack/Config.hs:496:9)
<date> <time>: [debug] Loading project config file stack.yaml @(stack_B8v5I05cffp30g7yBizAuN:Stack.Config src/Stack/Config.hs:519:13)
<date> <time>: [debug] Run process: ghc --info @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc --numeric-version @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal id @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/<user>/.stack/snapshots/<arch>/<resolver>/<compilerVersion>/pkgdb/ dump --expand-pkgroot @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/<user>/<projectDirectory>/.stack-work/install/<arch>/<resolver>/<compilerVersion>/pkgdb/ dump --expand-pkgroot @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)
<date> <time>: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_B8v5I05cffp30g7yBizAuN:System.Process.Read src/System/Process/Read.hs:254:3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions