[GHC] #10333: hs-boot modification doesn't induce recompilation

GHC ghc-devs at haskell.org
Sat Jul 25 04:16:31 UTC 2015


#10333: hs-boot modification doesn't induce recompilation
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by ezyang):

 I've diagnosed why this is occurring.

 `GhcMake` does some fancy business to determine if an object is stable.
 Essentially, object stability is a timestamped based check which tries to
 let `GhcMake` avoid recompiling source files which didn't change at all.

 However, stability is computed on a **per module name** basis,
 preferentially checking to see if `hs` files have been updated.  This
 means that if you modify an `hs-boot` file but not the `hs` file, GHC will
 still consider it "stable" because the stability check was done on `hs`;
 and will proceed to tell the one-shot compiler that the file was not
 modified.

 I'm not sure what the correct solution to this problem is.

 > You might also notice something else a bit funny, which is that X.hs
 gets compiled, even though it's not directly in the import chain of Y. I
 think this might be intentional but I'm not sure.

 This is because there is explicit logic in `GhcMake` to make this be the
 case.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10333#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list