You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version 2.16.0, Git revision 1817292 (10654 commits) PRE-RELEASE x86_64 has --haddock-executables (built on top of Cabal (the library)'s haddock --executables), but there are problems with the index.
Consider a two-package project (packageA, packageB) each with two executable components (eg packageA-exe1, packageA-exe2). The index generated for project packages has four links to Main but all of them are to the Main of packageB-exe1.
Using haddock --show-interface reveals that all four *.haddock files commence:
{"link_env":{"$main$Main$main":"Main", ...
That can be contrasted with the two *.haddock files for the main library:
If I am correct about the -this-unit-id difference, it has it origins in Distribution.Simple.Haddock.componentGhcOptions and Distribution.Simple.GHC.Internal.componentGhcOptions.
The master branch of Cabal has (extract):
componentGhcOptions verbosity lbi bi clbi odir =let implInfo = getImplInfo $ compiler lbi
inmempty
{ -- Respect -v0, but don't crank up verbosity on GHC if-- Cabal verbosity is requested. For that, use --ghc-option=-v instead!
ghcOptVerbosity = toFlag (min verbosity normal)
, ghcOptCabal = toFlag True
, ghcOptThisUnitId =case clbi ofLibComponentLocalBuildInfo{componentCompatPackageKey = pk} ->
toFlag pk
_ |not (unitIdForExes implInfo) ->memptyExeComponentLocalBuildInfo{componentUnitId = uid} ->
toFlag (unUnitId uid)
...
but unitIdForExes is not in any released version (up to Cabal-3.10.2.1 - GHC 9.8.2 comes with Cabal-3.10.2.0.). It was added in haskell/cabal@8d402c7
Version 2.16.0, Git revision 1817292 (10654 commits) PRE-RELEASE x86_64 has
--haddock-executables
(built on top of Cabal (the library)'shaddock --executables
), but there are problems with the index.Consider a two-package project (
packageA
,packageB
) each with two executable components (egpackageA-exe1
,packageA-exe2
). The index generated for project packages has four links toMain
but all of them are to theMain
ofpackageB-exe1
.Using
haddock --show-interface
reveals that all four*.haddock
files commence:That can be contrasted with the two
*.haddock
files for the main library:and
--cabal-verbosity 3
reveals that, with the main library, Cabal (the library) invokes Haddock with options that include:There is no equivalent for when Cabal invokes Haddock for the executable components.
The text was updated successfully, but these errors were encountered: