Search code examples
haskellcabalhaddock

cabal v2-haddock - renderBuildTargetProblem: unexpected status


I have tried to run cabal v2-haddock and I got

cabal: renderBuildTargetProblem: unexpected status (TargetDisabledByUser,Nothing)
CallStack (from HasCallStack):
  error, called at ./Distribution/Client/CmdErrorMessages.hs:329:14 in main:Distribution.Client.CmdErrorMessages

My cabal file is

name:                lsql-csv

-- The package version.  See the Haskell package versioning policy (PVP) 
-- for standards guiding when and how versions should be incremented.
-- https://wiki.haskell.org/Package_versioning_policy
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:             0.1.0.0

-- A short (one-line) description of the package.
synopsis:            Lapidary Structured Query Language implementation for csv files. The tool for fast text data manipulation. 

-- A longer description of the package.
-- description:         

-- URL for the project homepage or repository.
homepage:            https://github.com/stastnypremysl/lsql-csv/

-- The license under which the package is released.
license:             GPL-3

-- The file containing the license text.
license-file:        LICENSE

-- The package author(s).
author:              Přemysl Šťastný

-- An email address to which users can send suggestions, bug reports, and 
-- patches.
maintainer:          p@stty.cz

-- A copyright notice.
-- copyright:           

category:            Text

build-type:          Simple

-- Extra files to be distributed with the package, such as examples or a 
-- README.
extra-source-files:  README.md, ChangeLog.md

-- Constraint on the version of Cabal needed to build this package.
cabal-version:       >=1.10


executable lsql-csv
  -- .hs or .lhs file containing the Main module.
  main-is:             Main.hs

  ghc-options: 
    -O3
  
  -- Modules included in this executable, other than Main.
  -- other-modules:       
  
  -- LANGUAGE extensions used by modules in this package.
  -- other-extensions:    
  
  -- Other library packages from which modules are imported.
  build-depends:       dlist >= 0.8, base >=4.9 && <4.10, text >=1.2 && <1.3, parsec >=3.1 && <3.2, Glob >=0.10 && <0.11, array >=0.5 && <0.6, containers >=0.5 && <0.6
  
  -- Directories containing source files.
  hs-source-dirs:      src
  
  -- Base language which the package is written in.
  default-language:    Haskell2010

Do you have any idea, how to solve this problem please?

The project git is https://github.com/stastnypremysl/lsql-csv .

Thanks.

EDIT:

I use Gentoo. Could the problem be caused by missing doc flag in dev-haskell packages?


Solution

  • I think the error message attempts to tell you that cabal v2-haddock would not build any documentation by default as it contains no libraries. https://github.com/haskell/cabal/issues/6679 tracks error message improvement.