Enhancement: Default cabal to `-p` profiling enabled
Carl Howells
chowells79 at gmail.com
Thu Jul 24 20:36:42 UTC 2014
For what it's worth, this is my preference by a significant margin. I
recently stopped always turning on profiling builds because I was
getting tired of doubling the length of building everything,
especially when sandboxes are involved. I'd much rather cabal just
install profiling builds as necessary.
On Thu, Jul 24, 2014 at 2:30 PM, Andrew Pennebaker
<andrew.pennebaker at gmail.com> wrote:
> What if -p continued to default to false, but when -p was specified, cabal
> was smart enough to automatically recompile all dependencies with -p, rather
> than complaining about them lacking profiling?
>
>
> On Thu, Jul 24, 2014 at 12:51 PM, Alois Cochard <alois.cochard at gmail.com>
> wrote:
>>
>> Hi Andrew,
>>
>> I'm actually writing a tool to automate the workflow when coding on
>> multiple modules, and dealing with a shared sandbox.
>> I think that would be the perfect fit for an option like this (and thanks
>> to your email, I'll be sure it's easy to enable... or maybe even make it the
>> default... but ... developers often want fast compilation too!), I don't
>> really see that enabled by default on cabal for the same reason others
>> mentioned.
>>
>> Cheers
>>
>>
>> On 24 July 2014 00:18, Andrew Pennebaker <andrew.pennebaker at gmail.com>
>> wrote:
>>>
>>> I love GHC's profiling support, and like to use it to analyze the
>>> performance of my Haskell applications. However, profiling an application is
>>> difficult when it depends on any third-party libraries, as cabal doesn't
>>> include profiling information by default.
>>>
>>> Fortunately, cabal can reinstall a library with profiling support, with:
>>>
>>> cabal install --reinstall -p <library>
>>>
>>> Unfortunately, cabal is a bit of a simpleton, so this will fail unless
>>> that libraries dependencies are also installed with profiling enabled:
>>>
>>> cabal install --reinstall -p <libraryX> <libraryY> <libraryZ> ...
>>>
>>> For example, a user who wants to profile his die-rolling program must
>>> run:
>>>
>>> $ sudo apt-get install haskell-platform haskell-platform-doc
>>> haskell-platform-prof
>>> $ sudo cabal install --reinstall -p mwc-random rvar random-fu
>>> random-source mersenne-random-pure64 stateref flexible-defaults th-extras
>>> MonadPrompt math-functions erf vector-th-unbox monad-loops random-shuffle
>>> MonadRandom
>>>
>>> And that long list of packages must be slowly grown one at a time,
>>> starting from random-source, based on many attempts at running cabal install
>>> --reinstall -p ..., waiting several minutes for compilation to partially
>>> complete, and scrolling back up through the logs to track down which
>>> dependencies also neglected to compile with profiling enabled.
>>>
>>> It can take a while to get a list of this long, full dependency chain. It
>>> would be much easier if cabal simply enabled `-p` by default, so we didn't
>>> have to think about it.
>>>
>>> What do you think?
>>>
>>> --
>>> Cheers,
>>>
>>> Andrew Pennebaker
>>> www.yellosoft.us
>>>
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://www.haskell.org/mailman/listinfo/libraries
>>>
>>
>>
>>
>> --
>> A\ois
>> http://twitter.com/aloiscochard
>> http://github.com/aloiscochard
>
>
>
>
> --
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
More information about the Libraries
mailing list