-
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
Implement a single shared package database per GHC version #878
Comments
Possible short-cut to implementation, that may also add easier support for GHC 7.8. Starting from today's implementation:
|
I've opened PR #884 about this, closing. |
Share binary package buils between snapshots #878
yay 👍 |
wow, that was fast! If I understand right, this fix copies things, so there are redundant files taking up small disk space rather than just links, but that means we get the main benefit of skipping redundant compiling and we retain the ability to trash individual LTS version directories as each directory for an LTS snapshot is still fully self-contained, right? |
Not quite. It copies the executables still (which is a mistake on my part, it should hard link them on Unix systems, there's even a FIXME about it). Libraries and data files, however, are not copied at all and remain in the original directories, meaning that the snapshot is not fully self-contained. I wrote up a blog post about this. The file which is copied between snapshots is the .conf file inside the package database, but that one is tiny. |
Okay that sounds great, maximally efficient (once that FIXME is done). So, if someone were to carelessly trash an LTS directory because no project still used that LTS, would Stack know that libraries and data files (and executable after the FIXME) were missing from the newer LTS and thus then do the necessary recompiling to get them back into the necessary LTS directory? (Seems okay to let this be broken and tell people not to do that, but it's even better if this won't break things) |
No, it doesn't do intelligent recovery. The main reason for that is that it would add a major performance hit to stack: instead of being able to trust |
Got it, thanks for the clarity. But a full-refresh would obviously work if someone wants to actually trash .stack and .stack-work and recompile everything. I'm clear about it now, cheers |
And "that was fast" because I was on a train to and from Tel Aviv for 3 hours yesterday :) I wrote up a blog post about this implementation, I think I'll publish it tomorrow. It contains some of these details. And you're mentioned by name actually :) |
This is awesome. How does this relate to Cabal's newer "backpacking" features? Perhaps your blog covers that. |
Yes it does On Mon, Aug 31, 2015, 7:23 PM Elliot Cameron [email protected]
|
Blog post is live: https://www.fpcomplete.com/blog/2015/09/stack-more-binary-package-sharing |
Perfect. |
Motivation: avoid unnecessary recompiles. I held off on commenting on this until the new Cabal version with this support was announced, but given that it may be a while before that support filters down for everyone to be able to use it, I don't want to hold off any longer. Pinging @wolftune and @3noch from #771, and @borsboom and @chrisdone for general feedback.
Here's my idea:
stack ghci
and friends just include that database and the local database, and don't need to worry about conflicting packages.Concerns:
The text was updated successfully, but these errors were encountered: