-
Notifications
You must be signed in to change notification settings - Fork 710
cabal goes crazy on large Build-Depends lists #2548
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
Comments
@amigalemming Could you produce a profiling report, as described here? Because you're using Cabal as a library, you will need to build you own program with profiling as well. |
On Thu, 23 Apr 2015, Thomas Tuegel wrote:
Can you already reproduce and confirm the problem with the cabal-install |
Here is the profiling report I produced:
(I have truncated it to fit GitHub's comment length restrictions, but nothing interesting was omitted.) As we expected, @dcoutts What is the status of the improved parser? I noticed that ghc-7.10.1 no longer depends on the Cabal library; does this mean we need only wait 3 years to depend on parsec? ;) |
No, why? Old GHCs won't suddenly start depending on Cabal HEAD. We should be free to start using Parsec right now. |
On Thu, 23 Apr 2015, Thomas Tuegel wrote:
This means your call completes in 3.42 seconds? Here it does not complete
Are you sure you install acme-everything-2015.4.15.1 and not 2015.4.15, |
It does not complete here. After about 3 seconds CPU time I have to kill it because the OS is paging out everything else. My terminal emulator is usually the first thing paged out, for some reason, and as a result, the whole process takes about 10 minutes wall time. |
On Fri, 24 Apr 2015, Thomas Tuegel wrote:
That is, you can reproduce the problem. Do you still need a profiled run |
No, it seems like the problem is where we thought it would be. There's not much to do, besides wait for the new parser. Thanks! |
Sorry, I was being a little sarcastic. Although, we have to package our own version of binary because older GHC < 7.8 has a version that is too old. Why is parsec different? |
Because Parsec does not come with GHC? |
Sorry, now I'm completely lost. The situation with binary is, we must bundle our own version so that users of GHC < 7.8 don't have to download and install it themselves. But, you're saying the situation with Parsec is, we don't have to bundle our own version because users can download and install it themselves? |
If we make Cabal depend on Parsec users will have to download it themselves. Waiting N years won't help because Parsec is not going to be included with GHC until Cabal starts depending on it. The workaround for If you say that we should package Parsec with Cabal, then I think that it's a bad idea, because unlike |
No, I would never suggest that. I was very uneasy about including binary--I gave serious thought to reverting my binary persistent build configuration patches because of the need to include it. In the end, I decided I preferred (very slightly) not to wait three years. But, when we depend on Parsec--which we absolutely must do, and as soon as possible--our users will complain that Cabal is not buildable with an out-of-the-box, fresh GHC install. I think the best way forward on this front is to start distributing "super-sdist" tarballs with Cabal and its dependencies so that if cabal-install is unavailable, there is a known-good set of our dependencies available. There was a ticket around here somewhere to add a command for that, which I intended to work on for the next release, but now I can't find it for the life of me. |
Agreed, but such über-packages will need to be buildable with old versions of Cabal for this to work. |
If only portions of the parsing are deeply terribly, do we really need to move to parsec, or can we just hand-roll some recursive descent stuff just for this case? |
I don't think the problem here is actually the size of the |
Another option is to use the Happy parser generator (used by GHC itself). Since Happy generates Haskell code, the generated sources could be distributed. |
Fyi, the just merged #4654 has had a tremendous effect on heap allocations, here's a totally unfair heap profile comparison doing I think we can consider this issue fixed...? ;-) PS: Here's the +RTS -s output:
vs
|
Closing as fixed by #4654. |
acme-everything
is a package that depends on every other package on Hackage.I have to abort unpacking because it eats all my memory.
I first encountered this problem with my Hackage->BibTeX program that converts all Cabal files from index.tar to BibTeX entries. This program only parses the Cabal files. That is, I suspect that the huge Build-Depends list already asks too much of the parser.
The text was updated successfully, but these errors were encountered: