RE: [Haskell-cafe] cabal build command and package versions

2008-08-21 Thread Duncan Coutts
On Thu, 2008-08-21 at 08:23 +0100, Simon Peyton-Jones wrote:
> | On Wed, 2008-08-20 at 13:53 -0500, Nicolas Frisby wrote:
> | > I have a question about cabal's behavior for the build command. When
> | > using the build command on a cabalized project, any version changes
> | > for installed packages go unnoticed - the necessary modules in the
> | > project are not re-compiled.
> |
> | Yes. That's a ghc bug.
> 
> Different to the one below?  Is it in Trac?

Same one, the one recently fixed.

> | Yes, it's a pretty annoying ghc bug. You'll be glad to know that it is
> | fixed in ghc-6.10:
> |
> | http://hackage.haskell.org/trac/ghc/ticket/1372
> |
> | You'll notice a lot of people have commented on this one. It's tripped
> | up a lot of people.
> 
> And happily it's fixed for 6.10!

yay :-)

Duncan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] cabal build command and package versions

2008-08-21 Thread Simon Peyton-Jones
| On Wed, 2008-08-20 at 13:53 -0500, Nicolas Frisby wrote:
| > I have a question about cabal's behavior for the build command. When
| > using the build command on a cabalized project, any version changes
| > for installed packages go unnoticed - the necessary modules in the
| > project are not re-compiled.
|
| Yes. That's a ghc bug.

Different to the one below?  Is it in Trac?

| > Not knowing that the configure command is necessary to detect changes
| > in package that the current project depends on and proceeding only
| > with the build command has led to BusErrors and GHC incurring the
| > impossible in my exploration.
|
| Yes, it's a pretty annoying ghc bug. You'll be glad to know that it is
| fixed in ghc-6.10:
|
| http://hackage.haskell.org/trac/ghc/ticket/1372
|
| You'll notice a lot of people have commented on this one. It's tripped
| up a lot of people.

And happily it's fixed for 6.10!

Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal build command and package versions

2008-08-20 Thread Duncan Coutts
On Wed, 2008-08-20 at 13:53 -0500, Nicolas Frisby wrote:
> I have a question about cabal's behavior for the build command. When
> using the build command on a cabalized project, any version changes
> for installed packages go unnoticed - the necessary modules in the
> project are not re-compiled.

Yes. That's a ghc bug.

> If however, you run the configure command (though the .cabal file for
> the project has not changed) and then the build command, the
> appropriate modules (and only the appropriate modules) are
> re-compiled.

Really? I didn't think that made any difference. I've no idea what
configure would be doing that would get ghc to notice when it simply
lacks the ability to do so in general.

> Not knowing that the configure command is necessary to detect changes
> in package that the current project depends on and proceeding only
> with the build command has led to BusErrors and GHC incurring the
> impossible in my exploration.

Yes, it's a pretty annoying ghc bug. You'll be glad to know that it is
fixed in ghc-6.10:

http://hackage.haskell.org/trac/ghc/ticket/1372

You'll notice a lot of people have commented on this one. It's tripped
up a lot of people.

> Is there a reason that the build command does not check the packages
> for version changes? It seems fair to expect package-sensitivity of
> the process that determines if modules need to be re-compiled. This
> process, I think, is part of the build command and not the configure
> command.

There's really not much we can do in Cabal itself. It has to be fixed in
ghc and fortunately it now is fixed. That's because Cabal just uses ghc
--make for builds and rebuilds, so if it doesn't realise that it has to
rebuild after dependent packages change then we can't do much.

As I say, I've no idea why configure should make any difference. If it
does it's only by fluke and not design.

Duncan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal build command and package versions

2008-08-20 Thread Nicolas Frisby
I have a question about cabal's behavior for the build command. When
using the build command on a cabalized project, any version changes
for installed packages go unnoticed - the necessary modules in the
project are not re-compiled. If however, you run the configure command
(though the .cabal file for the project has not changed) and then the
build command, the appropriate modules (and only the appropriate
modules) are re-compiled.

Not knowing that the configure command is necessary to detect changes
in package that the current project depends on and proceeding only
with the build command has led to BusErrors and GHC incurring the
impossible in my exploration.

Is there a reason that the build command does not check the packages
for version changes? It seems fair to expect package-sensitivity of
the process that determines if modules need to be re-compiled. This
process, I think, is part of the build command and not the configure
command.

Here's an example scenario:

 - Imagine package Q depends on package P.

 - We "runhaskell Setup.hs clean/configure/build/install" them both,
from scratch, at version 0.

 - Then we change package P (by, say, introducing new fields to a
constructor that Q cases over), bump its version to 1, and "runhaskell
Setup.hs clean/configure/build/install" on it.

 - If we now "runhaskell build" on package Q, nothing is re-compiled,
though a package dependency has changed. "runhaskell Setup.hs build"
does not notice this.

 - However, if we "runhaskell configure/build" on package Q, then the
(necessary) modules are re-compiled.

Thanks for your time.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe