Mysterious "censorship" of old iface fingerprint
One would think if we have an out of date iface, we might as well remember its fingerprint for sake of diagnostics or whatever---what harm could this possible cause?
But GHC doesn't do this, and if one tries it:
"diff of trying"
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index 68103fc1f4..3e5ce3fe4b 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -215,21 +215,21 @@ checkVersions hsc_env mod_summary iface
; if moduleUnit (mi_module iface) /= thisPackage (hsc_dflags hsc_env)
then return (RecompBecause "-this-unit-id changed", Nothing) else do {
; recomp <- checkFlagHash hsc_env iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkOptimHash hsc_env iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkHpcHash hsc_env iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkMergedSignatures mod_summary iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkHsig mod_summary iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkHie mod_summary
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkDependencies hsc_env mod_summary iface
; if recompileRequired recomp then return (recomp, Just iface) else do {
; recomp <- checkPlugins hsc_env iface
- ; if recompileRequired recomp then return (recomp, Nothing) else do {
+ ; if recompileRequired recomp then return (recomp, Just iface) else do {
T13914
plugin-recomp-flags
static-plugins
I think this is indicative of other bugs (with GHC or with the testsuite). But I am not sure exactly what to do. I'd post the test output diffs but sadly I lost them. The weird thing was keeping around the fingerprint led to more rebuilding, not less. I have no idea what to make of that.