Plugin dependency information is stored separately
authorChristiaan Baaij <christiaan.baaij@gmail.com>
Wed, 1 Aug 2018 18:21:22 +0000 (14:21 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 1 Aug 2018 23:38:48 +0000 (19:38 -0400)
commit52065e95c6df89d0048c6e3f35d6cc26ce8246f9
tree78dac501a71e830bcf175af5b40b19643e17b6ed
parentf8618a9b15177ee8c84771b927cb3583c9cd8408
Plugin dependency information is stored separately

We need to store the used plugins so that we recompile
a module when a plugin that it uses is recompiled.

However, storing the `ModuleName`s of the plugins used by a
module in the `dep_mods` field made the rest of GHC think
that they belong in the HPT, causing at least the issues
reported in #15234

We therefor store the `ModuleName`s of the plugins in a
new field, `dep_plgins`, which is only used the the
recompilation logic.

Reviewers: mpickering, bgamari

Reviewed By: mpickering, bgamari

Subscribers: alpmestan, rwbarton, thomie, carter

GHC Trac Issues: #15234

Differential Revision: https://phabricator.haskell.org/D4937
compiler/deSugar/Desugar.hs
compiler/deSugar/DsUsage.hs
compiler/iface/MkIface.hs
compiler/main/DynamicLoading.hs
compiler/main/HscTypes.hs
compiler/main/Plugins.hs
testsuite/tests/plugins/Makefile
testsuite/tests/plugins/all.T
testsuite/tests/plugins/plugin-recomp-change.stderr [new file with mode: 0644]
testsuite/tests/plugins/plugin-recomp/Common.hs
testsuite/tests/plugins/plugin-recomp/Makefile