Plugins don't work with -fexternal-interpreter
Plugins don't work with -fexternal-interpreter.
The current plan to fix this is to enable GHC to always use the internal interpreter for plugins, even when
-fexternal-interpreter is given.
-fexternal-interpreter only determines which interpreter is used for running Template Haskell splices. The following tasks have been identified:
Support loading two different
UnitState(available units): one for the target, one for plugins
Add command-line flags (
-plugin-package-db, etc.) to build the plugins UnitState
Refactor many functions to explicitly pass Platform configuration (Platform, ways, etc.) as arguments. Currently we often pass
DynFlagsand callee functions implicitly use the
UnitStateof the target platform. It doesn't compose well and we want to be explicit about the platform we are using (target or host) (see also #17957).
Outputableinstance) implicitly queries the
UnitStateof the target platform (via
sdocWithDynFlags). We need to remove this