[GHC] #14651: recompilation checker overeager on executables produced with -o

GHC ghc-devs at haskell.org
Tue Jan 9 04:00:47 UTC 2018


#14651: recompilation checker overeager on executables produced with -o
-------------------------------------+-------------------------------------
           Reporter:  gershomb       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 -- Foo.hs
 module Main where

 main :: IO ()
 main = putStrLn "foo"
 }}}

 {{{
 -- Bar.hs
 module Main where

 main :: IO ()
 main = putStrLn "bar"
 }}}

 {{{
 ghc --make Foo.hs -o hello
 ghc --make Bar.hs -o hello
 }}}

 The first runthough this is fine. Any subsequent invocation of either of
 the above commands won't create a new executable again, even if the
 existing one is for "foo" and the command is invoked with "bar" or vice-
 versa. My guess is it sees that the *.hi and *.o files are up to date and
 sees the mtime of the executable is chronologically subsequent, so doesn't
 account for the fact that the file being compiled to an executable could
 itself have been changed.

 I don't know how fixable this is without always recompiling the
 executable, which is of course to be avoided. #13829 seems like it might
 be the flip-side of the same coin, so maybe fixing one also lets us fix
 the other...

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


More information about the ghc-tickets mailing list