[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 ```
Showing
- hadrian/hadrian.cabal 2 additions, 0 deletionshadrian/hadrian.cabal
- hadrian/src/Oracles/Flavour.hs 33 additions, 0 deletionshadrian/src/Oracles/Flavour.hs
- hadrian/src/Oracles/TestSettings.hs 1 addition, 1 deletionhadrian/src/Oracles/TestSettings.hs
- hadrian/src/Rules.hs 3 additions, 1 deletionhadrian/src/Rules.hs
- hadrian/src/Rules/BinaryDist.hs 1 addition, 0 deletionshadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Program.hs 1 addition, 0 deletionshadrian/src/Rules/Program.hs
- hadrian/src/Rules/Test.hs 1 addition, 0 deletionshadrian/src/Rules/Test.hs
- hadrian/src/Settings.hs 1 addition, 18 deletionshadrian/src/Settings.hs
- hadrian/src/Settings/Builders/Make.hs 1 addition, 0 deletionshadrian/src/Settings/Builders/Make.hs
- hadrian/src/Settings/Program.hs 24 additions, 0 deletionshadrian/src/Settings/Program.hs
Loading
Please register or sign in to comment