-
Notifications
You must be signed in to change notification settings - Fork 711
Use Binary to save/restore persistent build config #2076
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
Conversation
LGTM. |
Unfortunately, build fails on GHC 7.4 because of some name collision between |
Looks good in general. I think that we can drop GHC 7.2 compatibility for the next Cabal release - 7.2.2 was released in November 2011, so by the time GHC 7.10.1/Cabal 1.22 will come out, it will be >3 years old. |
I believe that GHC already does that. |
I just checked, and on my system with GHC 7.8.3, |
Interesting, I have no
And there's also a binary cache file in that directory, |
@23Skidoo I have a |
PackageTests has its own version of getPersistBuildConfig which does not check which version of Cabal created dist/setup-config. Now that the LocalBuildInfo is written with Binary, this version needed to be updated, too.
[ci-skip]
Use Binary to save/restore persistent build config
See #2058 and #1841. This is a big pull, but it's mostly just adding
deriving Generic
andinstance Binary a
for all the types inLocalBuildInfo
. As I noted in #1841,My profiling shows that allocation during a no-op build in the Cabal tree drops from 540 MB to 98 MB, an 82% reduction! The time profile shows that 98.9% of the time for a no-op build is spent in GHC, so I think this is the best we can do to speed things up on the Cabal side. (Maybe we can convince GHC to use binary package databases?) I've tested on GHC 7.8.3, as soon as it passes on Travis, I'll pull this.