[GHC] #8050: add a required wrapper around plugin installers

GHC ghc-devs at haskell.org
Fri Jul 12 19:32:44 CEST 2013


#8050: add a required wrapper around plugin installers
-------------------------------------+------------------------------------
        Reporter:  nfrisby           |            Owner:
            Type:  task              |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nfrisby):

 Replying to [comment:1 simonpj]:
 > Why can't the call to `mkPluginInstaller` be done by GHC itself, on line
 314 of `SimplCore`?  Why make the users call it?
 >
 > Simon

 My objective for `mkPluginInstaller` is generality: GHC can do whatever it
 needs in order for the plugin to otherwise Just Work. We have one example
 — as late as some GHC 7.6 installations — where this requires the plugin
 to be the caller of the `mkPluginInstaller`-esque function.
 `reinitializeGlobals` ([[Plugins/ReinitializeGlobals|cf]]) only works if
 it's called by the plugin, not by the compiler.

 So, for the sake of futureproofness, the plugin must be the caller of
 `mkPluginInstaller` in order for it to be able to handle issues like the
 multiple instances of libHSghc.

 The underlying problem fixed by `reinitializeGlobals` is that multiple
 libHSghc instances may exist, eg one for the compiler and one for a
 plugin.  Unfortunately, a user-convenient, robust, omni-platform method to
 prevent multiple instances of libHSghc does not appear to be in the near
 future.  Moreover, it's not clear that such a solution could be permanent,
 considering the difficulty of handling dynamic linking on the numerous
 [[Platforms]].

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



More information about the ghc-tickets mailing list