
It's not clear to me what the configure --scratchdir= option is for. It seems to be only used by hugs for building and installing and it defaults to dist/scratch. We don't allow any of the other locations under dist/scratch to be overridden, probably because there's not much point in that. Why do we need it for hugs? If we're going to have an option like this it should probably set the location of the whole dist/ directory hierarchy. Though that has its own problems since we'd need to have --scratchdir= as a global option to each command since we put the saved config info into $dist/ . In the mean time, if we're keeping dist/ fixed then we can always just rm -rf dist when doing a clean, fixing bug #92. If we allow the user to override $dist then we'd have to be a bit more removing it since the user could set it to some shared temp dir. Duncan

Quoting Duncan Coutts
It's not clear to me what the configure --scratchdir= option is for. It seems to be only used by hugs for building and installing and it defaults to dist/scratch.
We don't allow any of the other locations under dist/scratch to be overridden, probably because there's not much point in that. Why do we need it for hugs?
If we're going to have an option like this it should probably set the location of the whole dist/ directory hierarchy. Though that has its own problems since we'd need to have --scratchdir= as a global option to each command since we put the saved config info into $dist/ .
In the mean time, if we're keeping dist/ fixed then we can always just rm -rf dist when doing a clean, fixing bug #92. If we allow the user to override $dist then we'd have to be a bit more removing it since the user could set it to some shared temp dir.
Yes, --scratchdir is a hack for the Hugs build that allows it to build libraries that can be run inplace prior to installation. An option to move the whole of dist wouldn't be a replacement. I also think an option to move dist would introduce too many complications. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

On 8/10/07, ross@soi.city.ac.uk
I also think an option to move dist would introduce too many complications.
Lack of such option, in my opinion, shows how immature Cabal is as a build tool. I'd use the option if it existed, even with the drawbacks. However, I agree this might be too much for now - there's more important things broken in Cabal, and there's not enough developers. Too bad adding the option is likely to only get harder as Cabal expands and gets more users who rely on current behavior. Best regards, Esa

On Fri, 2007-08-10 at 23:10 +0300, Esa Ilari Vuokko wrote:
On 8/10/07, ross@soi.city.ac.uk
wrote: I also think an option to move dist would introduce too many complications.
Lack of such option, in my opinion, shows how immature Cabal is as a build tool. I'd use the option if it existed, even with the drawbacks.
As I said to Ross, I think this would be possible and there are a couple options we might choose.
However, I agree this might be too much for now - there's more important things broken in Cabal, and there's not enough developers.
I gave a 10 min talk at AngloHaskell on "Cabal needs you!" and several people expressed an interest in taking a look at Cabal refactoring, bug fixing or improving cabal-install. And if we can fix the mailing list issues...
Too bad adding the option is likely to only get harder as Cabal expands and gets more users who rely on current behavior.
Cheer up! :-) I don't see how users rely on the current behaviour. At the moment the dist directory is fixed relative to the source tree. Allowing the user to change that would only change things for users who choose to do that. All the internal code is relative to the distPref value. Duncan

On Fri, 2007-08-10 at 17:49 +0100, ross@soi.city.ac.uk wrote:
Quoting Duncan Coutts
: It's not clear to me what the configure --scratchdir= option is for. It seems to be only used by hugs for building and installing and it defaults to dist/scratch.
Yes, --scratchdir is a hack for the Hugs build that allows it to build libraries that can be run inplace prior to installation. An option to move the whole of dist wouldn't be a replacement.
Do you think we can do this in a more similar way to how we do it for ghc? We need to do inplace running/linking/registration for most compilers it seems.
I also think an option to move dist would introduce too many complications.
I've been looking at cleaning up the install dirs and build dirs code and I don't think it'd be that bad. If people wanted it however, it would require passing the same flag to each stage, since that directory is essential to find the saved configuration. Another alternative is to do what autoconf does which is to allow running setup from another directory, so it always puts it's config relative to the current directory, but the .cabal file could be specified and not necessarily live in the current directory. That'd allow the whole source tree to be read-only. eg: cabal configure --package=../../foo/foo.cabal cabal build cabal install Duncan
participants (3)
-
Duncan Coutts
-
Esa Ilari Vuokko
-
ross@soi.city.ac.uk