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 DynFlags
and callee functions implicitly use theUnitState
of 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). -
Pretty-printing of Unit
(via itsOutputable
instance) implicitly queries theUnitState
of the target platform (viasdocWithDynFlags
). We need to remove thisOutputable
instance.
Edited by Sylvain Henry