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>
Thu, 2 Aug 2018 02:42:22 +0000 (22:42 -0400)
commite86db0d59dc2f9d8f4140c6b3052762a1ae82428
treeb5e48ce24e0ac71b531a40de2625d700a6d3bd00
parent6a7cb80648253ebcc84be5f11e2cc78eae085aa8
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

(cherry picked from commit 52065e95c6df89d0048c6e3f35d6cc26ce8246f9)
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