-
Notifications
You must be signed in to change notification settings - Fork 842
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
hakyll dependency on nightly is not cached #3899
Comments
I think this may be caused by |
I found a single commit in Haddock that introduces the change: haskell/haddock@3bf3d4c. Steps to reproduceRun
|
@st3ll1s Thanks for digging into this. Looks like a bug at some level indeed. My guess is that there is an assumption somewhere that these sub libraries do not alias existing library names like attoparsec. Not sure. I encourage anyone affected by this to dig into stack's code and see if they can work out exactly what's going on and ideally fix it in the form of a PR. |
I experience the same issue with Hakyll. It causes build times of about 15 min, which is unbearable. How can I help to get this fixed? I tried running stack with the verbose flag, but the output didn't indicate anything special. |
A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite.
@bergus seems like you were right in pinpointing the commit, it defines |
I've tried changing
|
@st3ll1s can you do something similar to undoing the haskell/haddock@3bf3d4c , e.g. don't introduce any named libraries at all please? |
@k-bx See st3ll1s/haddock@b29547e. This seems to work, no unnecessary rebuilds anymore! |
It appears that internal library support was added to stack already (cf #3361 and the resolution in #3430). So I think the problem here is just the rebuild logic, and was likely present from the start. I could get a minimal repro going with the Indeed I see a similar message in the verbose logs:
So it appears that the package is discarded from the check for known/needed packages, and thus forced to always be rebuilt. Since it is rebuilt, this in turn precipitates everything downstream of it being rebuilt. Since this affects all packages with internal libraries, then it seems like it would be good to fix. Until then, all such packages will have forced rebuilds. By the way, if someone wants to tackle it, from reviewing 3430, my best guess at where the problem is would be: Line 624 in d1c40ae
The comment seems relevant. (edit: just checked master and confirmed the comment is still there) |
I think I'm going to give it a try and see if I can submit a PR fixing this sometimes this week. |
I've made a candidate PR but it's still work in progress, I'll revisit it after the weekend. At the moment, the
Most likely, I'll need a similar change to the one for I'll add more to this after the weekend, don't think I can get some more work done until then. |
Got some time today, I think all is done now and #3955 solves this. |
A bug in stack was causing several dependencys to be recompiled on every build See: commercialhaskell/stack#3899
Solved by #3955, thanks @mihaimaruseac! |
With the resolver set to
resolver: nightly-2018-03-01
, a package depending onhakyll
always rebuildshaddock-library
,pandoc
,pandoc-citeproc
andhakyll
. This does not happen if I set the resolver toresolver: lts-10.7
. The rebuilds cause significant slowdowns.Both
pandoc
andpandoc-citeproc
seem to beextra-deps
of hakyll. Maybe this is related?Steps to reproduce
stack.yaml
, setresolver: nightly-2018-03-01
.stack build
.stack build
again.package.yaml
:Expected
The second
stack build
should not build anything again.Actual
haddock-library
,pandoc
,pandoc-citeproc
andhakyll
are rebuilt.Output of the second
stack build --verbose
: https://gist.github.com/st3ll1s/3ef40d7d3e5513a31ef031bab129deffStack version
Method of installation
curl -sSL https://get.haskellstack.org/ | sh
The text was updated successfully, but these errors were encountered: