Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how come the README example configures with --disable-documentation? #107

Open
bmillwood opened this issue Jan 5, 2025 · 6 comments · May be fixed by #109
Open

how come the README example configures with --disable-documentation? #107

bmillwood opened this issue Jan 5, 2025 · 6 comments · May be fixed by #109
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@bmillwood
Copy link

setup/README.md

Line 165 in f5975f0

cabal configure --enable-tests --enable-benchmarks --disable-documentation

It goes on to build documentation anyway. Is it something to do with the dependency cache?

(This is a documentation request, unless it's a mistake, in which case this is a bug report :) )

@andreasabel andreasabel added the faq User question label Jan 7, 2025
@andreasabel
Copy link
Member

Hi Ben @bmillwood,
this is a stumbling stone in the cabal UI.
--disable-documentation only states that the documentation for the dependencies should not be built, and will not be linked in the documentation of the targets of cabal haddock.

Does this answer your question?

@bmillwood
Copy link
Author

Hi Ben @bmillwood, this is a stumbling stone in the cabal UI. --disable-documentation only states that the documentation for the dependencies should not be built, and will not be linked in the documentation of the targets of cabal haddock.

Does this answer your question?

In this run, it seems like cabal decided to build (at least many of) the docs for the dependencies at the haddock step anyway: https://github.com/bmillwood/bluesky-tools/actions/runs/12623008445/job/35171545170

But this is after the cache is saved, so the dependency docs don't get cached, and I imagine my haddock step would take 5 minutes every time, whereas if I built the dependency docs at the same time as building the dependencies, I think they would get cached.

Am I better off enabling documentation, or did I miss something?

@andreasabel
Copy link
Member

Odd.

Am I better off enabling documentation, or did I miss something?

This it at least worth an experiment.

Another experiment would be to pass --disable-documentation again on the command line to cabal haddock, maybe the setting from cabal.project.local (generated by cabal configure) isn't picked up by cabal haddock.

If you do these experiments, please let me know, so I can update my advice accordingly!

@bmillwood
Copy link
Author

bmillwood commented Jan 7, 2025

Thanks. I'll probably get around to doing some tests at some point but right now my thing works for me so it's unlikely to be high priority :)

I forgot to mention it last time but I did already try passing --enable-documentation in this run: https://github.com/bmillwood/bluesky-tools/actions/runs/12623081607/job/35171688430

It's a little hard to draw firm conclusions from this because of course even identically configured runs can differ in performance because of the changing state of the cache, but feel free to browse through the rest of my runs here if you'd find that useful or interesting: https://github.com/bmillwood/bluesky-tools/actions

@andreasabel
Copy link
Member

This issue could also be a regression in cabal-3.14

Actually, I think it is still this regression:

The documentation: False in cabal.project.local seems to be ignored by cabal haddock, you have to pass --disable-documentation on the command line.

@andreasabel
Copy link
Member

@andreasabel andreasabel added documentation Improvements or additions to documentation and removed faq User question labels Jan 8, 2025
@andreasabel andreasabel self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants