In 1.9.3, when moving to a new LTS, if one hadn't specifically built their project and all its deps via:
stack build --test --haddock
then the first time stack haddock is invoked after an initial vanilla stack build, all deps are rebuilt from scratch with their Haddocks included for linking. This used to cost a lot of time, so I've been very careful when bumping snapshots.
New scenario: I'm on the master branch of stack, in a project that only ever had a naked stack build ran on it (so, no docs included). Now I notice that stack haddock will run just fine, but quickly warns me that since none of the deps have their docs built, it won't attempt to link to them (which is arguably the entire point of stack haddock --open, and stack hoogle --server, etc.). Nor does it rebuild them all, like it used to do.
stack build in a project that uses that LTS.stack haddock, and notice it warn about missing dep docs.Perhaps stack build should always invoke Haddock for deps, just so the links are always there?
My project docs don't link to any external dependencies. Is there a way for me to rebuild my deps, without nuking my whole ~/.stack/?
> stack --version
Version 2.0.0 (7456 commits) x86_64 hpack-0.31.2
Self-built from master.
Potentially related: #4754
@fosskers is this the warning you're seeing:
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: async-2.2.1, exceptions-0.10.2,
hashable-1.2.7.0, microlens-0.4.10, primitive-0.6.4.0, rio-0.1.8.0,
transformers-compat-0.6.4, typed-process-0.2.4.0, unliftio-0.2.10,
unliftio-core-0.1.2.0, unordered-containers-0.2.9.0, vector-0.12.0.3
?
Yes
@fosskers I've just merged #4813. I'm going to close this out, if the issue continues, please comment and I'll reopen
I'm on master, but not noticing any dep rebuild when I stack haddock in an established project. Could my global .stack/ be in a borked state? I've been grabbing updates from master often over the past week or so.
Well, I nuked my .stack/, project-local .stack-work/, and rebuilt with stack haddock. Docs were generated with proper links.
That sounds like the original issue is still present, am I correct?
if stack haddock was done after stack build then it's not, otherwise I don't think that anything could be said about it
The old behaviour (as of 1.9.3) was that stack haddock would rebuild deps who hadn't had their docs built before. Subsequent stack build or stack haddock then wouldn't do rebuilds.
@fosskers could you be a bit more explicit? Do you see some visible problem in Stack's master behavior so we need to reopen this ticket?
Okay, tonight I can bite the bullet and wipe my global .stack/ again. Then to test, I'd do stack build in a project, then stack haddock, and see what gets rebuilt.
@fosskers not sure if it helps much but I've used Docker to do "clean" builds
Since this is still active, I'm reopening.
stack hoogle --rebuild certainly does the correct thing (i.e. the 1.9.3 behaviour, where libs w/ missing docs are rebuilt), whereas it wasn't on master before the recent changes by @qrilka .
@fosskers if everything is in place then please close the issue, thanks
I'll close it once I've confirmed everything, which should be today or tomorrow.