[GHC] #11244: Compiler plugins should not have visibility controlled by -package
GHC
ghc-devs at haskell.org
Tue Dec 22 23:23:11 UTC 2015
#11244: Compiler plugins should not have visibility controlled by -package
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: ezyang
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1661
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang <ezyang@…>):
In [changeset:"1faf1fcaebb2871f8085b01d0c6d19eec11dc808/ghc" 1faf1fc/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="1faf1fcaebb2871f8085b01d0c6d19eec11dc808"
Implement -hide-all-plugin-packages and -plugin-package(-id), fixing
#11244
Summary:
The basic idea is that we have a new set of "exposed modules"
which are /only/ used for plugins, i.e. -fplugin Foo and
--frontend Foo. You can interact with this namespace
using the flags -plugin-package-id and -plugin-package.
By default, this namespace contains all modules in the
user namespace (as before), but you can toggle that using
-hide-all-plugin-packages.
There is one nasty hack: GhcMake respects -fplugin in
GHC_OPTIONS to make local plugins work correctly. It also
bails out of you have an import of a module which doesn't
exist locally or in the package database. The upshot is
that we need to be sure to check in the plugin modules
too, so we don't give a spurious failure when a plugin
is in the plugin namespace but not the main namespace.
A better way to fix this would be to distinguish between
plugin and normal dependencies in ModSummary.
I cheated a little and tweaked a few existing plugins
tests to exercise the new code paths.
TODO: Documentation
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin, simonpj, duncan
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1661
GHC Trac Issues: #11244
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11244#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list