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

#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

#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 Resolution: | Keywords: source | plugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * cc: robinpp (removed) * cc: robinp (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15940#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | Keywords: source | plugins Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by facundo.dominguez: Old description:
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?
New description: 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. As things stand, `ghc` wants to know where the plugin is every time it is mentioned in the dependencies of a module which is being linked, even though the plugin won't be used for anything. This sometimes can make the plugin harder to use in a large project. 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#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | Keywords: source | plugins Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * failure: None/Unknown => GHC rejects valid program -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15940#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC