[GHC] #15940: Source plugins should be able to opt-out from appearing in dependencies

GHC ghc-devs at haskell.org
Fri Nov 23 13:26:14 UTC 2018


#15940: Source plugins should be able to opt-out from appearing in dependencies
-------------------------------------+-------------------------------------
           Reporter:                 |             Owner:  (none)
  facundo.dominguez                  |
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.3
          Component:  Compiler       |           Version:  8.6.2
           Keywords:  source         |  Operating System:  Unknown/Multiple
  plugins                            |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Currently when ghc build a module M using a source plugin in a package P,
 P shows up in the interface file of M (`M.hi`).

 According to `--show-iface`, P shows up in the `package dependencies`
 section, and in an `addDependentFile` entry.

 Presumably, this is necessary to recompile M if P ever changes. But
 unfortunately, including P in the interface file is the wrong thing to do
 when the plugin does not affect the result of the compilation of M.

 It is only fair to wonder what the point would be in using a plugin which
 does not modify the compilation. I hit this case when using the upcoming
 haskell-indexer-plugin, which extracts source code information for later
 examination.

 If the indexer plugin changes, there is no point in rebuilding M, unless
 the user really wants to reindex the source code.

 Can we change the plugin interface to opt-out of tracking dependencies? Or
 would it work better to provide a ghc flag to control this?

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


More information about the ghc-tickets mailing list