Skip to content

stack build --haddock-executables does not build docs for executable #6826

@sjshuck

Description

@sjshuck

General summary/comments (optional)

I have an executable defined in my package.yaml but no library. When I run stack build --haddock-executables as some docs seems to suggest I can, it just compiles my executable but doesn't mention anything about docs, as it would when successfully running stack haddock in a project with a library.

Using:

  • Stack 3.7.1
  • GHC 9.10.3
  • Cabal 3.16.0.0

Steps to reproduce

  1. stack new --snapshot lts-24.19 reproduce
  2. Remove from the package.yaml the library and tests top-level entries and the dependencies of the executable
  3. Remove the import from app/Main.hs and redefine main = return ()
  4. stack build --haddock-executables

Expected

The executable should build and a message should appear stating the path to a generated index.html.

Actual

Only the executable builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions