Re: recompilation on --main-is

2012-02-16 Thread Conrad Parker
Hi Simon,

I've tested with current master (commit 6f4a073) and the link time is
back down. In fact the compile time seems fast in general, and an
unrelated ld error which I hadn't yet tracked down has disappeared
too.

Thanks for the quick patch!

Conrad.

On 16 February 2012 19:45, Simon Marlow  wrote:
> Will be fixed in 7.4.2:
>
> http://hackage.haskell.org/trac/ghc/ticket/5878
>
> Cheers,
>        Simon
>
>
> On 16/02/2012 05:10, Evan Laforge wrote:
>>
>> Thanks for bringing this up. I've been having the same problem and was
>> thinking there was something wrong with my system. I have 3 main files
>> and one util that they all import. Every build recompiles every file,
>> even if there were no changes.
>>
>> On Feb 15, 2012 8:39 PM, "Conrad Parker" > > wrote:
>>
>>    Hi,
>>
>>    We have a project with around 200 Haskell source files, and around 20
>>    executables which import these (as well as importing third-party
>>    libraries). We first build all the non-main files using a makefile
>>    generated with ghc -M. We then build the executables using a separate
>>    invocation of "ghc --make --main-is foo.hs", for each foo.hs. This
>>    worked fine with ghc-7.2.1; each final "ghc --make" would simply link
>>    the pre-built object files -- but with ghc-7.4.1 all these files are
>>    recompiled for each target executable. As a result our full build
>>    takes around 10-20x longer with ghc-7.4.1 than ghc-7.2.1.
>>
>>    Looking at compiler/iface/FlagChecker.hs, it seems that the --main-is
>>    flag is used as an input to the recompilation checker. It would make
>>    sense that --main-is should force recompilation of the particular file
>>    that exports 'main', but it also forces recompilation of its
>>    dependencies. Is this a bug or is there a good reason to recompile
>>    everything?
>>
>>    Conrad.
>>
>>    ___
>>    Glasgow-haskell-users mailing list
>>    Glasgow-haskell-users@haskell.org
>>    
>>    http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>>
>>
>>
>>
>> ___
>> Glasgow-haskell-users mailing list
>> Glasgow-haskell-users@haskell.org
>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: recompilation on --main-is

2012-02-16 Thread Evan Laforge
On Thu, Feb 16, 2012 at 3:45 AM, Simon Marlow  wrote:
> Will be fixed in 7.4.2:
>
> http://hackage.haskell.org/trac/ghc/ticket/5878

Nice, thanks for the quick fix!

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: recompilation on --main-is

2012-02-16 Thread Simon Marlow

Will be fixed in 7.4.2:

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

Cheers,
Simon

On 16/02/2012 05:10, Evan Laforge wrote:

Thanks for bringing this up. I've been having the same problem and was
thinking there was something wrong with my system. I have 3 main files
and one util that they all import. Every build recompiles every file,
even if there were no changes.

On Feb 15, 2012 8:39 PM, "Conrad Parker" mailto:con...@metadecks.org>> wrote:

Hi,

We have a project with around 200 Haskell source files, and around 20
executables which import these (as well as importing third-party
libraries). We first build all the non-main files using a makefile
generated with ghc -M. We then build the executables using a separate
invocation of "ghc --make --main-is foo.hs", for each foo.hs. This
worked fine with ghc-7.2.1; each final "ghc --make" would simply link
the pre-built object files -- but with ghc-7.4.1 all these files are
recompiled for each target executable. As a result our full build
takes around 10-20x longer with ghc-7.4.1 than ghc-7.2.1.

Looking at compiler/iface/FlagChecker.hs, it seems that the --main-is
flag is used as an input to the recompilation checker. It would make
sense that --main-is should force recompilation of the particular file
that exports 'main', but it also forces recompilation of its
dependencies. Is this a bug or is there a good reason to recompile
everything?

Conrad.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org

http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: recompilation on --main-is

2012-02-15 Thread Evan Laforge
Thanks for bringing this up. I've been having the same problem and was
thinking there was something wrong with my system. I have 3 main files and
one util that they all import. Every build recompiles every file, even if
there were no changes.
On Feb 15, 2012 8:39 PM, "Conrad Parker"  wrote:

> Hi,
>
> We have a project with around 200 Haskell source files, and around 20
> executables which import these (as well as importing third-party
> libraries). We first build all the non-main files using a makefile
> generated with ghc -M. We then build the executables using a separate
> invocation of "ghc --make --main-is foo.hs", for each foo.hs. This
> worked fine with ghc-7.2.1; each final "ghc --make" would simply link
> the pre-built object files -- but with ghc-7.4.1 all these files are
> recompiled for each target executable. As a result our full build
> takes around 10-20x longer with ghc-7.4.1 than ghc-7.2.1.
>
> Looking at compiler/iface/FlagChecker.hs, it seems that the --main-is
> flag is used as an input to the recompilation checker. It would make
> sense that --main-is should force recompilation of the particular file
> that exports 'main', but it also forces recompilation of its
> dependencies. Is this a bug or is there a good reason to recompile
> everything?
>
> Conrad.
>
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


recompilation on --main-is

2012-02-15 Thread Conrad Parker
Hi,

We have a project with around 200 Haskell source files, and around 20
executables which import these (as well as importing third-party
libraries). We first build all the non-main files using a makefile
generated with ghc -M. We then build the executables using a separate
invocation of "ghc --make --main-is foo.hs", for each foo.hs. This
worked fine with ghc-7.2.1; each final "ghc --make" would simply link
the pre-built object files -- but with ghc-7.4.1 all these files are
recompiled for each target executable. As a result our full build
takes around 10-20x longer with ghc-7.4.1 than ghc-7.2.1.

Looking at compiler/iface/FlagChecker.hs, it seems that the --main-is
flag is used as an input to the recompilation checker. It would make
sense that --main-is should force recompilation of the particular file
that exports 'main', but it also forces recompilation of its
dependencies. Is this a bug or is there a good reason to recompile
everything?

Conrad.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users