From d0c2f3a2b6ec2d3ee2b9f017eb52c72cf6187d6f Mon Sep 17 00:00:00 2001 From: Artem Pyanykh Date: Wed, 11 Sep 2019 21:12:32 +0100 Subject: [hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled change Currently, if you change these ^ flavour parameters, rebuilding is not triggered, since `programContext` doesn't set up a dependency on those values. Exposing these values via an oracle does set the dependency and properly triggers a rebuild of binaries. Several attempts to factor out these actions ended up in cyclic dependency here or there. I'm not absolutely happy with this variant either, but at least it works. ==== Issue repro: In UserSettings.hs: ``` dbgDynamic = defaultFlavour { name = "dbg-dynamic" , dynamicGhcPrograms = pure True, ... } dbgStatic = defaultFlavour { name = "dbg-static" , dynamicGhcPrograms = pure False ... } ``` Then in console: ``` $ hadrian/build.sh -j --flavour=dbg-dynamic ... does the build $ hadrian/build.sh -j --flavour=dbg-static ... does nothing, considers binaries up to date ``` --- hadrian/hadrian.cabal | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hadrian/hadrian.cabal') diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index 6037a21849..02c64bc9e7 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -48,6 +48,7 @@ executable hadrian , Hadrian.Target , Hadrian.Utilities , Oracles.Flag + , Oracles.Flavour , Oracles.Setting , Oracles.ModuleFiles , Oracles.TestSettings @@ -102,6 +103,7 @@ executable hadrian , Settings.Flavours.GhcInGhci , Settings.Packages , Settings.Parser + , Settings.Program , Settings.Warnings , Stage , Target -- cgit v1.2.1