[commit: ghc] master: Implement -hide-all-plugin-packages and -plugin-package(-id), fixing #11244 (1faf1fc)

git at git.haskell.org git at git.haskell.org
Tue Dec 22 23:23:18 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1faf1fcaebb2871f8085b01d0c6d19eec11dc808/ghc

>---------------------------------------------------------------

commit 1faf1fcaebb2871f8085b01d0c6d19eec11dc808
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Fri Dec 18 18:29:52 2015 -0800

    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


>---------------------------------------------------------------

1faf1fcaebb2871f8085b01d0c6d19eec11dc808
 compiler/main/DynFlags.hs                          |  49 ++++++---
 compiler/main/DynamicLoading.hs                    |   6 +-
 compiler/main/Finder.hs                            |  27 ++++-
 compiler/main/Packages.hs                          | 111 ++++++++++++++++-----
 docs/users_guide/extending_ghc.rst                 |  51 +++++++++-
 docs/users_guide/packages.rst                      |   2 +-
 ghc/GHCi/UI.hs                                     |  12 ++-
 testsuite/.gitignore                               |   1 +
 testsuite/tests/ghc-api/T9595.hs                   |   3 +-
 testsuite/tests/plugins/Makefile                   |  16 ++-
 .../should_fail/tcfail008.hs => plugins/T11244.hs} |   2 -
 testsuite/tests/plugins/T11244.stderr              |   3 +
 testsuite/tests/plugins/all.T                      |   6 ++
 13 files changed, 232 insertions(+), 57 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1faf1fcaebb2871f8085b01d0c6d19eec11dc808


More information about the ghc-commits mailing list