hs-boot + fno-code breaks recompilation checking for hs-boot files
It's easiest to observe this with the ./hadrian/ghci.sh
script. If you load the script and then modify the ghc/Main.hs
then it should just reload ghc/Main.hs
but it recompiles every hs-boot file.
Ok, 521 modules loaded.
Main> :r
[ 3 of 521] Compiling GHC.HsToCore.PmCheck.Types[boot] ( compiler/GHC/HsToCore/PmCheck/Types.hs-boot, nothing ) [flags changed]
[ 12 of 521] Compiling DynFlags[boot] ( compiler/main/DynFlags.hs-boot, nothing ) [flags changed]
[ 18 of 521] Compiling Hooks[boot] ( compiler/main/Hooks.hs-boot, nothing ) [flags changed]
[ 22 of 521] Compiling Name[boot] ( compiler/basicTypes/Name.hs-boot, nothing ) [flags changed]
[ 23 of 521] Compiling OccName[boot] ( compiler/basicTypes/OccName.hs-boot, nothing ) [flags changed]
[ 24 of 521] Compiling Outputable[boot] ( compiler/utils/Outputable.hs-boot, nothing )
[ 30 of 521] Compiling Plugins[boot] ( compiler/main/Plugins.hs-boot, nothing ) [flags changed]
[ 31 of 521] Compiling PrimOp[boot] ( compiler/prelude/PrimOp.hs-boot, nothing ) [flags changed]
[ 37 of 521] Compiling TcHoleFitTypes[boot] ( compiler/typecheck/TcHoleFitTypes.hs-boot, nothing ) [flags changed]
[ 40 of 521] Compiling TyCon[boot] ( compiler/types/TyCon.hs-boot, nothing ) [flags changed]
[ 46 of 521] Compiling Module[boot] ( compiler/basicTypes/Module.hs-boot, nothing ) [flags changed]
[ 47 of 521] Compiling Packages[boot] ( compiler/main/Packages.hs-boot, nothing ) [flags changed]
[ 52 of 521] Compiling TcType[boot] ( compiler/typecheck/TcType.hs-boot, nothing ) [flags changed]
[ 59 of 521] Compiling IdInfo[boot] ( compiler/basicTypes/IdInfo.hs-boot, nothing ) [flags changed]
[ 60 of 521] Compiling ErrUtils[boot] ( compiler/main/ErrUtils.hs-boot, nothing ) [flags changed]
[ 79 of 521] Compiling PrelNames[boot] ( compiler/prelude/PrelNames.hs-boot, nothing ) [flags changed]
[ 94 of 521] Compiling CoreMonad[boot] ( compiler/simplCore/CoreMonad.hs-boot, nothing ) [flags changed]
[105 of 521] Compiling Var[boot] ( compiler/basicTypes/Var.hs-boot, nothing ) [flags changed]
[106 of 521] Compiling TyCoRep[boot] ( compiler/types/TyCoRep.hs-boot, nothing ) [flags changed]
[107 of 521] Compiling TysWiredIn[boot] ( compiler/prelude/TysWiredIn.hs-boot, nothing ) [flags changed]
[108 of 521] Compiling TyCoPpr[boot] ( compiler/types/TyCoPpr.hs-boot, nothing )
[113 of 521] Compiling KnownUniques[boot] ( compiler/prelude/KnownUniques.hs-boot, nothing ) [flags changed]
[126 of 521] Compiling PatSyn[boot] ( compiler/basicTypes/PatSyn.hs-boot, nothing ) [flags changed]
[127 of 521] Compiling IfaceType[boot] ( compiler/iface/IfaceType.hs-boot, nothing ) [flags changed]
[130 of 521] Compiling GHC.Hs.Pat[boot] ( compiler/GHC/Hs/Pat.hs-boot, nothing ) [flags changed]
[132 of 521] Compiling GHC.Hs.Expr[boot] ( compiler/GHC/Hs/Expr.hs-boot, nothing ) [flags changed]
[133 of 521] Compiling DataCon[boot] ( compiler/basicTypes/DataCon.hs-boot, nothing ) [flags changed]
[134 of 521] Compiling ConLike[boot] ( compiler/basicTypes/ConLike.hs-boot, nothing ) [flags changed]
[137 of 521] Compiling Coercion[boot] ( compiler/types/Coercion.hs-boot, nothing ) [flags changed]
[139 of 521] Compiling MkId[boot] ( compiler/basicTypes/MkId.hs-boot, nothing ) [flags changed]
[143 of 521] Compiling Type[boot] ( compiler/types/Type.hs-boot, nothing ) [flags changed]
[149 of 521] Compiling ToIface[boot] ( compiler/iface/ToIface.hs-boot, nothing ) [flags changed]
[162 of 521] Compiling BlockId[boot] ( compiler/cmm/BlockId.hs-boot, nothing ) [flags changed]
[185 of 521] Compiling CoreUnfold[boot] ( compiler/coreSyn/CoreUnfold.hs-boot, nothing ) [flags changed]
[261 of 521] Compiling TcRnTypes[boot] ( compiler/typecheck/TcRnTypes.hs-boot, nothing ) [flags changed]
[269 of 521] Compiling GHC.StgToCmm.Bind[boot] ( compiler/GHC/StgToCmm/Bind.hs-boot, nothing )
[351 of 521] Compiling TcUnify[boot] ( compiler/typecheck/TcUnify.hs-boot, nothing ) [flags changed]
[352 of 521] Compiling TcSplice[boot] ( compiler/typecheck/TcSplice.hs-boot, nothing ) [flags changed]
[353 of 521] Compiling TcRnDriver[boot] ( compiler/typecheck/TcRnDriver.hs-boot, nothing ) [flags changed]
[354 of 521] Compiling TcMatches[boot] ( compiler/typecheck/TcMatches.hs-boot, nothing ) [flags changed]
[355 of 521] Compiling TcIface[boot] ( compiler/iface/TcIface.hs-boot, nothing ) [flags changed]
[356 of 521] Compiling TcExpr[boot] ( compiler/typecheck/TcExpr.hs-boot, nothing ) [flags changed]
[357 of 521] Compiling TcEnv[boot] ( compiler/typecheck/TcEnv.hs-boot, nothing ) [flags changed]
[359 of 521] Compiling RnExpr[boot] ( compiler/rename/RnExpr.hs-boot, nothing ) [flags changed]
[368 of 521] Compiling TcPatSyn[boot] ( compiler/typecheck/TcPatSyn.hs-boot, nothing ) [flags changed]
[371 of 521] Compiling RnSplice[boot] ( compiler/rename/RnSplice.hs-boot, nothing ) [flags changed]
[372 of 521] Compiling LoadIface[boot] ( compiler/iface/LoadIface.hs-boot, nothing ) [flags changed]
[398 of 521] Compiling TcHoleErrors[boot] ( compiler/typecheck/TcHoleErrors.hs-boot, nothing ) [flags changed]
[408 of 521] Compiling Match[boot] ( compiler/deSugar/Match.hs-boot, nothing ) [flags changed]
[409 of 521] Compiling DsExpr[boot] ( compiler/deSugar/DsExpr.hs-boot, nothing ) [flags changed]
[410 of 521] Compiling DsBinds[boot] ( compiler/deSugar/DsBinds.hs-boot, nothing ) [flags changed]
[464 of 521] Compiling TcInstDcls[boot] ( compiler/typecheck/TcInstDcls.hs-boot, nothing ) [flags changed]
[493 of 521] Compiling SPARC.CodeGen.Gen32[boot] ( compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot, nothing )
[521 of 521] Compiling Main ( ghc/Main.hs, nothing )
Ok, 521 modules loaded.
This makes any reload take far longer than it should do which is really noticeable when using the GHC API to implement an IDE.