As a newbie to the cabal-devel list, I don't know whether this question has already been thought about much, and perhaps even has a really good answer. I notice that the Cabal darcs repo now has a Cabal.cabal file that uses configurations. Presumably this is self-bootstrapping. But is it still possible to upgrade an older version of Cabal (e.g. supplied with ghc-6.2) to the latest version, using only the older version of Cabal itself? Regards, Malcolm
On 8/16/07, Malcolm Wallace
As a newbie to the cabal-devel list, I don't know whether this question has already been thought about much, and perhaps even has a really good answer.
I notice that the Cabal darcs repo now has a Cabal.cabal file that uses configurations. Presumably this is self-bootstrapping. But is it still possible to upgrade an older version of Cabal (e.g. supplied with ghc-6.2) to the latest version, using only the older version of Cabal itself?
No. Unfortunately, checking for the right cabal version is done after parsing, but exactly then do we get errors with the new syntax. Cabal bootstraps via a makefile, and this seems to work fine. For Windows, we might need a .bat file some time. Are there any other reasons why this should be possible? -- "Remember! Everytime you say 'Web 2.0' God kills a startup!" - userfriendly.org, Jul 31, 2006
On Thu, 2007-08-16 at 17:17 +0100, Malcolm Wallace wrote:
As a newbie to the cabal-devel list, I don't know whether this question has already been thought about much, and perhaps even has a really good answer.
I notice that the Cabal darcs repo now has a Cabal.cabal file that uses configurations. Presumably this is self-bootstrapping. But is it still possible to upgrade an older version of Cabal (e.g. supplied with ghc-6.2) to the latest version, using only the older version of Cabal itself?
We've never supported building with an older version of cabal, but fortunately that's never necessary since it can always self-bootstrap: ghc -i. --make Setup.lhs -o setup No makefiles or scripts required. I thought previously that the -i. was not necessary as ghc should look at the local files in preference to any existing registered Cabal package but although it compiles the local files it seems to still link to the existing package. Or something else similarly weird. In fact I've no idea what's going on there just that it works with -i. and it doesn't always without. Duncan
Duncan Coutts
Is it still possible to upgrade an older version of Cabal (e.g. supplied with ghc-6.2) to the latest version, using only the older version of Cabal itself?
We've never supported building with an older version of cabal, but fortunately that's never necessary since it can always self-bootstrap:
Ah, I see. That's quite clever. So any new version of Cabal will always depend on itself to install itself, ignoring any pre-existing version of Cabal. So in fact, you do not even need to have Cabal installed already, to get started! Regards, Malcolm
On Fri, 2007-08-17 at 11:33 +0100, Malcolm Wallace wrote:
Duncan Coutts
wrote: Is it still possible to upgrade an older version of Cabal (e.g. supplied with ghc-6.2) to the latest version, using only the older version of Cabal itself?
We've never supported building with an older version of cabal, but fortunately that's never necessary since it can always self-bootstrap:
Ah, I see. That's quite clever. So any new version of Cabal will always depend on itself to install itself, ignoring any pre-existing version of Cabal. So in fact, you do not even need to have Cabal installed already, to get started!
Yes, in fact it's actually easier when there's no existing Cabal package since then it "Just Works"tm to do: runghc Setup configure runghc Setup build etc.. although that's a tad slow since runghc has to interpret all the source modules rather than just Setup.lhs. IMHO it should also work when there is already a Cabal package registered rather than us having to specify "-i.". I've not figured out yet if thats a ghc bug or intended behaviour. Duncan
participants (3)
-
Duncan Coutts -
Malcolm Wallace -
Thomas Schilling