--only-depencies saves time?
Christopher Allen
cma at bitemyapp.com
Sun Aug 2 02:27:18 UTC 2015
Best way to avoid this problem in my experience is to use something that'll
cache dependencies so that you're building as few new packages as possible
when checking something out. Historically people have used their user
package-dbs or sandboxes (just package-dbs you put in a place), but there's
nothing done to ensure versions won't start conflicting as the arrow of
time plunges forward.
To that end, I think Stack[1] is pretty useful as you can pick a default
(global to you) user snapshot and everything the snapshot covers will have
a set of versions that work with everything else. This doesn't cover
absolutely everything on Hackage but it should save a lot of build time if
you're going on a library perambulation.
There's no reason, in principle, that you couldn't accomplish the same with
careful tending of a package-db yourself, but in practice nobody knows or
cares to know how anything works so its best to just give them something
they can outsource their executive functions to WRT package versioning.
[1]: https://github.com/commercialhaskell/stack
On Sat, Aug 1, 2015 at 9:19 PM, Peder Jakobsen <pjakobsen at gmail.com> wrote:
> I’ve read the Simple Guide to Cabal at http://katychuang.com/cabal-guide/
>
> It says:
>
> create a copy of a package by running the command
> cabal install
> Some flags can speed up this process
> --only-dependencies
> -jN to build N packages in parallel
> --dry-run to see what cabal plans to do (recommended)
>
> But here’s the thing (piping a word count from —dry-run)
>
> $ cabal install hakyll --dry-run | wc -l
> 97
> cabal install hakyll --only-dependencies --dry-run | wc -l
> 96
>
> So it takes 20+ minutes to install a package that you just want to check
> out for a few minutes, while your CPU melts down in the process? I must be
> missing something here…?
>
> Thanks again for your newbie support, greatly appreciated.
>
> P.J.
>
>
>
>
> _______________________________________________
> cabal-devel mailing list
> cabal-devel at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel
>
>
--
Chris Allen
Currently working on http://haskellbook.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/cabal-devel/attachments/20150801/7d804d72/attachment-0001.html>
More information about the cabal-devel
mailing list