[GHC] #11315: GHC doesn't restore split objects

GHC ghc-devs at haskell.org
Wed Dec 30 00:38:01 UTC 2015


#11315: GHC doesn't restore split objects
-------------------------------------+-------------------------------------
           Reporter:  snowleopard    |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
           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:
-------------------------------------+-------------------------------------
 While working on the new Shake-based build system I came across an
 annoying problem related to missing split objects ([#note see note]).

 I still don't fully understand the reasons behind the problem, but I found
 that GHC doesn't restore missing split objects, as explained in the
 example below. I think this is a bug, but maybe this is actually a missing
 feature. I think it shouldn't be difficult to fix.

 {{{#!hs
 module Test (test) where

 test :: Int
 test = 0
 }}}

 I compile the above with `ghc -split-objs Test.hs` and get two split
 object files in `Test_o_split`. Then if I delete any of these files, or
 even the whole folder, and rerun `ghc -split-objs Test.hs` the compiler
 doesn't bother to restore split objects, pretending that everything is up-
 to-date. However, if I delete `Test.o` all object files are restored.

 Another related issue reported by Neil Mitchell (which may be worth a
 separate ticket) is that even if we corrupt `Test.o` and rerun `ghc
 -split-objs Test.hs`, the compiler doesn't restore the object file (nor
 missing split objects) to the consistent state.

 ----

 [=#note Note:] The problem I have is described here:
 https://github.com/snowleopard/shaking-up-ghc/issues/30. It's not
 necessary to follow the link to understand this ticket, however I'd
 appreciate any insight you might have about the reasons behind the problem
 and/or a possible solution.

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


More information about the ghc-tickets mailing list