[Haskell-cafe] uninstalling libraries
twhitehead at gmail.com
Tue Nov 14 03:38:24 UTC 2017
I used to fight with a combination of system and cabal installed packages
under debian testing.
Then, about a year ago, the frustration became too much and I switched to
using nix, intero in emacs, and stack with the nix resolver, all installed
with nix on my debian machine. Couldn't be happier.
If I want a new dependency, I just add it to my cabal file, rerun
cabal2nix, restart intero and it all just works. Talk about a vastly
improved experience over what I used to have.
As a major bonus I now also run the exact same setup on our HPC cluster,
which runs centos 6, and I can switch between them seamlessly.
PS: The only gotcha I ran into so far is that stack/intero installs a
ghcpaths package outside of nix on first startup that can causes conflicts
with some packages. Turns out you can just manually remove it though to
resolve this, so no big deal.
On Sun, Nov 12, 2017, 23:52 Brandon Allbery, <allbery.b at gmail.com> wrote:
> cabal and stack, and in the case of stack, cabal new-build, and possibly
> cabal sandboxes, you probably shouldn't be trying to uninstall.
> And yes, the data lines are telling ghc what to compile / link with, not
> files but command line inclusions. And this will be especially messy on OS
> X because of the need to group .dylibs together to avoid making the link
> commands section too large with multiple RPATH entries. (Which will also
> complicate uninstallation there.)
> On Sun, Nov 12, 2017 at 11:45 PM, Evan Laforge <qdunkan at gmail.com> wrote:
>> On Sun, Nov 12, 2017 at 8:14 PM, Brandon Allbery <allbery.b at gmail.com>
>> > This is something of a nasty problem, considering that storing uninstall
>> > information separately is not particularly robust. Perhaps ghc-pkg
>> > if it doesn't already, support extension fields that e.g. cabal can use
>> > store uninstall information. (But even that potentially has problems,
>> > that people are known to copy package registration information between
>> > package databases. If there is uninstall information in there, what
>> > if someone uninstalls via one or the other copy?)
>> Aren't packages only allowed to install a restricted set of things
>> into a restricted set of places? We have the code (.hi, .a, .so,
>> etc., in import-dirs / library-dirs), possibly library-specific data
>> (I assume that's data-dir), and haddock (haddock-html and
>> haddock-interfaces, awkwardly in separate places).
>> One problem is that I don't fully understand what those fields mean,
>> is there documentation somewhere? And then the fact that these are
>> all plural so presumably you could have a lot of them, what is that
>> I'm guessing library-dirs means something like "put this on your -L
>> line" so it's clearly a mistake to interpret that as "here's where I
>> put the library", and you'll have things like /usr/local/lib if you
>> need to link external libraries.
>> Is there any more complicated install plan than put *.a, *.so, *.hi in
>> $root/lib/$ghc/$package-$id, put haddock in
>> $root/share/doc/$ghc/$package, put ad-hoc junk in
>> $root/share/$ghc/$package? I assume there must be, but who's doing
>> that and why? If it's OS packages, then they have their own uninstall
>> mechanisms, presumably not ghc's problem.
> brandon s allbery kf8nh sine nomine
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe