commercialhaskell / commercialhaskell/stack

Does not gernerate documentation with reexported-modules

Open
#4,949 0 comments 0 reactions 0 assignees View on GitHub
component: Cabal library component: haddock type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

# Summary
`stack` does not correctly bundle the Haddock documentation for libraries with a `reexported-modules` field in the `.cabal` file.

### Steps to reproduce

1. `$ git clone https://github.com/amnh/PCG && cd PCG && git checkout 0.2.0`
2. `$ make clean && stack build --haddock --haddock-deps --haddock-hyperlink-source --haddock-internal pcg-core`
3. Open the local documentation file reported by stack in a web browser. The local URI is reported by `stack` in the following form:
```
Updating Haddock index for local packages in
/home/user/Code/PCG/.stack-work/install/x86_64-linux//8.6.5/doc/index.html
```
4. Notice the missing documentation for the following modules:
```
Analysis.Clustering
Analysis.Parsimony.Additive
Analysis.Parsimony.Dynamic.DirectOptimization
Analysis.Parsimony.Dynamic.DirectOptimization.Pairwise
Analysis.Parsimony.Fitch
Analysis.Parsimony.Sankoff
Analysis.Scoring
Analysis.TotalEdgeCost
Bio.Character
Bio.Character.Decoration.Additive
Bio.Character.Decoration.Continuous
Bio.Character.Decoration.Discrete
Bio.Character.Decoration.Discrete.Class
Bio.Character.Decoration.Dynamic
Bio.Character.Decoration.Fitch
Bio.Character.Decoration.Metric
Bio.Character.Decoration.NonMetric
Bio.Character.Encodable
Bio.Character.Encodable.Continuous
Bio.Character.Type
Bio.Metadata
Bio.Metadata.CharacterName
Bio.Metadata.Continuous
Bio.Metadata.Discrete
Bio.Metadata.DiscreteWithTCM
Bio.Metadata.Dynamic
Bio.Metadata.Metric
Bio.Sequence
Bio.Sequence.Block
Bio.Sequence.Character
Bio.Sequence.Metadata
Bio.Graph
Bio.Graph.Component
Bio.Graph.Constructions
Bio.Graph.LeafSet
Bio.Graph.Node
Bio.Graph.Node.Context
Bio.Graph.PhylogeneticDAG
Bio.Graph.PhylogeneticDAG.Substitute
Bio.Graph.ReferenceDAG
Bio.Graph.ReferenceDAG.Internal
Bio.Graph.ReferenceDAG.Network
Bio.Graph.ReferenceDAG.Traversal
Bio.Graph.ReferenceDAG.Utility
Bio.Graph.Solution
Bio.Graph.ZipperDAG
Data.EdgeLength
Data.MetricRepresentation
Data.NodeLabel
Data.TCM
Data.TCM.Dense
Data.TopologyRepresentation
Test.Custom.NucleotideSequence
```

### Expected

Documentation from all exported and re-exported modules present in the haddock documentation index.

### Actual

Documentation is missing from re-exported modules in the haddock documentation index.

### Logs

You can view the output of the following `stack` invocation on my machine [here](https://gist.github.com/recursion-ninja/b4e3899d501d656c60046305f415a873
)

$ stack build --haddock --haddock-deps --haddock-hyperlink-source --haddock-internal --verbose pcg-core

### Stack version

```
$ stack --version
Version 2.1.1, Git revision f612ea85316bbc327a64e4ad8d9f0b150dc12d4b (7648 commits) x86_64 hpack-0.31.2
```

### Method of installation

Some method several years ago followed by numerous `stack upgrade` commands.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.