Skip to content

cabal haddock rebuilds (all?) the dependencies since cabal-install-3.9.0.0 (or 3.8?) #8707

Closed

Description

@phadej

E.g. trying with tree-diff

% ~/.ghcup/bin/cabal-3.9.0.0 build   
Up to date

but then

% ~/.ghcup/bin/cabal-3.9.0.0 haddock
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - StateVar-1.2.2 (lib) (requires build)
 - attoparsec-0.14.4 (lib:attoparsec-internal) (requires build)
 - base-compat-0.12.2 (lib) (requires build)
 - base-orphans-0.8.7 (lib) (requires build)
 - bytestring-builder-0.10.8.2.0 (lib) (requires build)
 - colour-2.3.5 (lib) (requires build)
 - data-array-byte-0.1.0.1 (lib) (requires build)
 - dlist-1.0 (lib) (requires build)
 - generically-0.1 (lib) (requires build)
 - indexed-traversable-0.1.2 (lib) (requires build)
 - integer-logarithms-1.0.3.1 (lib) (requires build)
 - primitive-0.7.4.0 (lib) (requires build)
 - splitmix-0.1.0.4 (lib) (requires build)
 - tagged-0.8.6.1 (lib) (requires build)
 - th-abstraction-0.4.5.0 (lib) (requires build)
 - transformers-compat-0.7.2 (lib) (requires build)
 - vector-stream-0.1.0.0 (lib) (requires build)
 - contravariant-1.5.5 (lib) (requires build)
 - ansi-terminal-0.11.4 (lib) (requires build)
 - hashable-1.4.2.0 (lib) (requires build)
 - random-1.2.1.1 (lib) (requires build)
 - distributive-0.6.2.1 (lib) (requires build)
 - vector-0.13.0.0 (lib) (requires build)
 - ansi-wl-pprint-0.6.9 (lib) (requires build)
 - unordered-containers-0.2.19.1 (lib) (requires build)
 - time-compat-1.9.6.1 (lib) (requires build)
 - text-short-0.1.5 (lib) (requires build)
 - scientific-0.3.7.0 (lib) (requires build)
 - data-fix-0.3.2 (lib) (requires build)
 - OneTuple-0.3.1 (lib) (requires build)
 - uuid-types-1.0.5 (lib) (requires build)
 - QuickCheck-2.14.2 (lib) (requires build)
 - comonad-5.0.8 (lib) (requires build)
 - charset-0.3.9 (lib) (requires build)
 - attoparsec-0.14.4 (lib) (requires build)
 - indexed-traversable-instances-0.1.1.1 (lib) (requires build)
 - base-compat-batteries-0.12.2 (lib) (requires build)
 - bifunctors-5.5.14 (lib) (requires build)
 - parsers-0.12.11 (lib) (requires build)
 - witherable-0.4.2 (lib) (requires build)
 - semigroupoids-5.3.7 (lib) (requires build)
 - assoc-1.0.2 (lib) (requires build)
 - these-1.1.1.1 (lib) (requires build)
 - strict-0.4.0.1 (lib) (requires build)
 - semialign-1.2.0.1 (lib) (requires build)
 - aeson-2.1.1.0 (lib) (requires build)
 - tree-diff-0.2.2 (lib) (configuration changed)
Starting     base-orphans-0.8.7 (lib)
Starting     bytestring-builder-0.10.8.2.0 (lib)
Starting     data-array-byte-0.1.0.1 (lib)
Starting     colour-2.3.5 (lib)
...

This is bad regression. (I didn't use 3.8.1.0 as it was broken otherwise, so cannot tell if it's already broken too).

Activity

  1. phadej commented on Jan 27, 2023

    @phadej
    CollaboratorAuthor

    Oh, it tries to build haddocks for all the dependencies too? And then occasionally fails when they are not buildable. :O

    like (with GHC-8.4.4 - older GHCs have buggier haddocks):

    Error: cabal-3.9.0.0: Failed to build documentation for vector-0.13.0.0 (which is required by test:cabal-parsers-golden from cabal-install-parsers-0.5, bench:cabal-parsers-bench from cabal-install-parsers-0.5 and others).
    
  2. phadej commented on Jan 27, 2023

    @phadej
    CollaboratorAuthor
  3. Mikolaj commented on Jan 27, 2023

    @Mikolaj
    Member

    Guessing: "--disable-documentation"? Perhaps the PR has some discussion.

  4. Mikolaj commented on Jan 27, 2023

    @Mikolaj
    Member

    But agreed, this needs to be spelled out.

  5. phadej commented on Jan 27, 2023

    @phadej
    CollaboratorAuthor

    #7462 (comment) says that --disable-documentation doesn't work. Let's see what CI setup reports if I add --disable-documentation.

  6. Mikolaj commented on Jan 27, 2023

    @Mikolaj
    Member

    #8330 supposedly fixes it.

  7. phadej commented on Jan 27, 2023

    @phadej
    CollaboratorAuthor

    Ok, seems that issue is lacking documentation (in the changelog). The --disable-documentation reverts the behavior to previous (which is what I want in CI).

    I'm not a fan of #7462 change, as you can control that by having documentation: True in ~/.cabal/config (or at least you should ). As building dependencies always with documentation would save you building them twice.

    I wouldn't changed the default for cabal haddock, but I guess that ship has sailed.

    I'm sad there is no way to control the cabal haddock default behavior, I expect to mostly use --disable-documentation, as I use cabal haddock to check that formatting is correct, and appreciate fast (initial) feedback. (I lookup docs on Hackage, not that much locally, tbh).

  8. Mikolaj commented on Jan 27, 2023

    @Mikolaj
    Member

    Thank you for the investigation. I've noted down to improve this bit of release notes (mention --disable-documentation) at release time.

  9. ulysses4ever commented on Jan 27, 2023

    @ulysses4ever
    Collaborator

    Can someone explain me why #7462 is mentioned here while the OP does not mention cabal haddock but rather cabal build. #7462 is supposed to only affect cabal haddock. Does it affect cabal build somehow?

  10. Mikolaj commented on Jan 30, 2023

    @Mikolaj
    Member

    @ulysses4ever: the second code snippet has cabal haddock.

  11. ulysses4ever commented on Jan 30, 2023

    @ulysses4ever
    Collaborator

    @Mikolaj oh, my bad, thank you! I think I will change the title of the issue so that it mentions haddock too.

  12. changed the title [-]cabal-install-3.9.0.0 rebuilds (all?) the dependencies[/-] [+]`cabal haddock` rebuilds (all?) the dependencies since cabal-install-3.9.0.0 (or 3.8?)[/+] on Jan 30, 2023
  13. mouse07410 commented on Jan 30, 2023

    @mouse07410
    Collaborator

    I recall this problem occurring when rebuilding Agda, without haddock getting involved.

  14. added
    re: enable-documentation
    on Feb 3, 2023
  15. added a commit that references this issue on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: cmd/haddockre: enable-documentationtype: user-question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions