nice little Cabal gotcha

Duncan Coutts duncan.coutts at
Wed Apr 9 16:58:35 EDT 2008


BTW, do file a bug report describing this issue so we do not forget. If
you want to include my two suggestions then you could link it to the
ticket aboug making cabal/cabal-install remember what files it installs.


On Mon, 2008-04-07 at 18:37 +0700, Peter Gammie wrote:
> Imagine this: you're hacking a library, and occasionally you put a "- 
> p" on your config line and sometimes you don't.
> (My cycle is occasional-clean-setup then build, which I grant might be  
> a bit paranoid. I get impatient and fiddle with the profiling and  
> optimisation options.)
> Now, if one compiles a library with "-p", then without it, the old  
> profiling library persists in the installed location, leading to some  
> head scratching when a later compilation with a "-p" config option  
> mysteriously fails.
> Two proposals:
> - rm -r $INSTALL_LOCATION (e.g. ~/lib/package/)
>   (brutal but effective; I think Cabal should claim ownership of at  
> least the package subdirs that it will populate)
> - print "Compiling normally..." and "Compiling for profiling..." to  
> make it clearer when the compilation craps out
> I guess you'll be squeamish about the first one, but I for one would  
> like such an option when hacking.
> cheers
> peter

More information about the cabal-devel mailing list