[Haskell-cafe] cabal-install profiling libraries
duncan.coutts at googlemail.com
Fri Aug 20 09:50:48 EDT 2010
On 20 August 2010 14:20, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
> Here's another instance of the machine (*) telling me what to do,
> instead of doing it (or am I missing something):
> I have a large set of cabal packages installed with ghc.
> Then suddenly I need some package Foo with profiling.
> So I switch to library-profiling: True in my .cabal/config,
> and then "cabal install Foo" - failing with the message:
> Perhaps you haven't installed the profiling libraries for package `Bar'
> for some package Bar that Foo depends upon. - Dear Cabal: Yes!
> I know that I haven't installed them! I want you to install them for me!
> But it isn't listening ...
> Of course you know that I have the highest respect for the work
> of the cabal authors. I'm just suggesting that the above feature
> (auto-re-install dependencies) would be helpful.
As usual the problem is lack of devevloper time to implement all these
nice features we all want.
> Perhaps it's already there?
> If not - would it be hard to specify? To build? Or would it have
> bad consequences?
>From the ticket:
Our current thinking on this issue is that we should track each
That is we should register profiling, vanilla and any other ways
with ghc-pkg as
independent package instances. This needs coordination with ghc
since it means
a change to the package registration information to include the way.
The idea is that once we track each way separately then Cabal will
know if the profiling way is installed or not and we can install the
profiling instance if it is missing without messing up any existing
> Is it "cabal upgrade --reinstall"? But that was deprecated?
Yes, "upgrade" is deprecated, use "install" instead. (The meaning /
behaviour of "upgrade" just sowed confusion.)
> Here I really want "reinstall with exactly the same versions".
Use: cabal install --reinstall foo-x.y.z
> Is it the problem that their sources may have vanished, meanwhile?
> Could it be solved by having "cabal install" storing a copy of
> the source package that it used?
No, the problem is we don't actually know if the profiling versions of
libs are installed or not. The ghc-pkg database does not contain this
information. Also, if we did know and started reinstalling packages,
what happens if we get half way and fail, we'd have messed up existing
installed working packages. Having profiling instances be separate
will make it all much easier.
More information about the Haskell-Cafe