
Hello GHC Developers, I've recently been working on a proposal (found here https://github.com/ghc-proposals/ghc-proposals/pull/245[1]) for "Extended Dependency Generation". This new feature takes the form of a new build option/mode that outputs comprehensive build dependencies for building Haskell modules. This allows external build tools, such as cabal-install, to implement correct incremental builds with recompilation avoidance using GHC's one shot mode to compile individual modules. All input is appreciated. It would be particularly helpful to hear from the Cabal, Stack, and Shake communities. Looking forward to hearing your comments, David Eichmann [1] https://github.com/ghc-proposals/ghc-proposals/pull/245 -- David Eichmann, Haskell Consultant Well-Typed LLP, http://www.well-typed.com Registered in England & Wales, OC335890 118 Wymering Mansions, Wymering Road, London W9 2NF, England

Hi, from the proposal it sounds like you are planning to only extend the single-shot mode with the new options, is that right? I think `ghc --make` could also benefit from being able to communicate non-module graph dependencies such as `addDependentFile` and CPP #include to build-tools, no? I've always been annoyed by the fact that if such dependencies change cabal will not consider rebuilding. --Daniel On Tue, Jul 30, 2019 at 06:58:29PM +0100, David Eichmann wrote:
Hello GHC Developers,
I've recently been working on a proposal (found here https://github.com/ghc-proposals/ghc-proposals/pull/245[1]) for "Extended Dependency Generation". This new feature takes the form of a new build option/mode that outputs comprehensive build dependencies for building Haskell modules. This allows external build tools, such as cabal-install, to implement correct incremental builds with recompilation avoidance using GHC's one shot mode to compile individual modules.
All input is appreciated. It would be particularly helpful to hear from the Cabal, Stack, and Shake communities.
Looking forward to hearing your comments,
David Eichmann
[1] https://github.com/ghc-proposals/ghc-proposals/pull/245
-- David Eichmann, Haskell Consultant Well-Typed LLP, http://www.well-typed.com
Registered in England & Wales, OC335890 118 Wymering Mansions, Wymering Road, London W9 2NF, England
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Hi Daniel, While the proposal is aimed at improving the single-shot mode use case, I don't see a reason why this wouldn't work in make mode: GHC would report dependencies of all modules being built. Is there a use case you have in mind where that would be useful? - David On 7/30/19 7:22 PM, Daniel Gröber wrote:
Hi,
from the proposal it sounds like you are planning to only extend the single-shot mode with the new options, is that right?
I think `ghc --make` could also benefit from being able to communicate non-module graph dependencies such as `addDependentFile` and CPP #include to build-tools, no?
I've always been annoyed by the fact that if such dependencies change cabal will not consider rebuilding.
--Daniel
On Tue, Jul 30, 2019 at 06:58:29PM +0100, David Eichmann wrote:
Hello GHC Developers,
I've recently been working on a proposal (found here https://github.com/ghc-proposals/ghc-proposals/pull/245[1]) for "Extended Dependency Generation". This new feature takes the form of a new build option/mode that outputs comprehensive build dependencies for building Haskell modules. This allows external build tools, such as cabal-install, to implement correct incremental builds with recompilation avoidance using GHC's one shot mode to compile individual modules.
All input is appreciated. It would be particularly helpful to hear from the Cabal, Stack, and Shake communities.
Looking forward to hearing your comments,
David Eichmann
[1] https://github.com/ghc-proposals/ghc-proposals/pull/245
-- David Eichmann, Haskell Consultant Well-Typed LLP, http://www.well-typed.com
Registered in England & Wales, OC335890 118 Wymering Mansions, Wymering Road, London W9 2NF, England
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- David Eichmann, Haskell Consultant Well-Typed LLP, http://www.well-typed.com Registered in England & Wales, OC335890 118 Wymering Mansions, Wymering Road, London W9 2NF, England

Hi David, On Tue, Jul 30, 2019 at 07:42:08PM +0100, David Eichmann wrote:
While the proposal is aimed at improving the single-shot mode use case, I don't see a reason why this wouldn't work in make mode: GHC would report dependencies of all modules being built.
Ok cool, that's what I thought.
Is there a use case you have in mind where that would be useful?
I'm just a bit sceptical that fully switching to single-shot mode is actually a good idea in all cases so I'd like to keep --make at feature parity. However I do have a particular use-case in mind as well: Instead of having one --make instance per-package I'd like a sort of build-plan wide GHC server process to allow more sharing of in-memory build products. I think other people have been playing with that idea too so it's not exactly new but in the context of Haskell-IDE-Engine this might actually be something that makes a lot of sense to do because we already have what is essentially a GHC server process running the whole time, namely HIE itself. --Daniel
participants (2)
-
Daniel Gröber
-
David Eichmann