[GHC] #13152: Provide a mechanism to notify build system when .hi file is ready

GHC ghc-devs at haskell.org
Fri Jan 20 00:00:58 UTC 2017


#13152: Provide a mechanism to notify build system when .hi file is ready
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Driver            |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Here's how this could look with locks instead of a buildserver. The
 semantics of the lock file is that if you ran the action to build `Foo.hi`
 and you can take the lock on `Foo.o-lock`, then `Foo.o` is ready.

 {{{
 Foo.hi : Bar.hi Baz.hi
     ( flock Foo.o-lock ghc -c Foo.hs -finterface-file-finished=1,0,x & ) \
       | read -n 1

 Foo.o : Foo.hi
     flock Foo.o-lock true
 }}}

 Ideally we'd also propagate the exit status of `ghc` to the rule for
 `Foo.o`, and clean up the lock files.

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


More information about the ghc-tickets mailing list