Where should cabal install to by default?

Hi folks, cabal-install is supposed to make things simpler for users, especially new users. It's partly successful at that currently. Many users do not know ghc-pkg even exists for example (not that it was a design goal but it seems to be a consequence). On the other hand we're currently failing users by not making programs they install work by default. Currently cabal-install installs all binaries to ~/.cabal/bin by default. It does per-user installs by default and uses ~/.cabal as its prefix. Obviously ~/.cabal/bin is not on the $PATH, so users who install say, yi or whatever find that typing yi at the prompt does not do anything even though they just installed it. That's a failure on our part. It should work, and if we cannot make it work by default then we need to tell users what they need to do to make it work. So I'd like to discuss what defaults we should use. For reference, these are the features that are implemented right now that we have to play with: * We can do per-user or global installs (affects which package db we use but it also changes the default prefix) * We can set any --prefix we like * We can use versioned binaries (ie adding -$version suffixes) * We can add symlinks to binaries in some other directory * We can use a commend like sudo to do the install phase We can control all these features in the ~/.cabal/config file. When cabal-install is first run it creates a default ~/.cabal/config file. So the question is what default it should set and how we report failure cases to the user. We do not have to use the same defaults on every platform. If we can get away with it I think it's much nicer not to make it interactive. Here's a couple suggestions: For unix systems, do per-user installs to --prefix=~/.cabal but if ~/bin exists then add symlinks there. Or perhaps if ~/bin is not a convention on that unix platform (eg OSX) then do global installs by default to /usr/local and use sudo for the install phase (we know that OS X comes with sudo where as it may or may not on other unix systems). Duncan

Duncan Coutts wrote:
... For unix systems, do per-user installs to --prefix=~/.cabal but if ~/bin exists then add symlinks there.
just a reminder for anyone: if a directory is not already in $PATH then it's annoying to change $PATH; older shell sessions won't be updated automatically with the new $PATH, at least. Makes it a little harder to give the user advice on what to do, in the cases in which we have to resort to merely giving advice. -Isaac

On Sun, 2008-08-03 at 15:44 -0400, Isaac Dupree wrote:
Duncan Coutts wrote:
... For unix systems, do per-user installs to --prefix=~/.cabal but if ~/bin exists then add symlinks there.
just a reminder for anyone: if a directory is not already in $PATH then it's annoying to change $PATH; older shell sessions won't be updated automatically with the new $PATH, at least. Makes it a little harder to give the user advice on what to do, in the cases in which we have to resort to merely giving advice.
And many new users don't know what a path is or how to change one. I'd like to avoid new users seeing: $ cabal install xmonad cabal: this didn't do what you expected, to fix it change the foo setting in your bar file. It's not friendly. Actually at the moment it's worse though: $ cabal install xmonad [.. lots of build output .. ] $ xmonad bash: xmonad: command not found # user gives up, assuming cabal is borked Duncan
participants (2)
-
Duncan Coutts
-
Isaac Dupree