HPT plugins cause error "mkPluginUsage" when loaded into GHCi
Same reproducer as #19772 (closed)
[nix-shell:~/ghc-hash-builds/cabal-test-plugin-recomp]$ cabal new-repl q
Warning: The package list for 'hackage.haskell.org' is 17 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-8.10.2 -O1
In order, the following will be built (use -v for more details):
- p-0.1.0.0 (lib) (first run)
- q-0.1.0.0 (exe:q) (first run)
Configuring library for p-0.1.0.0..
Warning: The 'license-file' field refers to the file 'LICENSE' which does not
exist.
Preprocessing library for p-0.1.0.0..
Building library for p-0.1.0.0..
[1 of 1] Compiling Lib ( Lib.hs, /home/matt/ghc-hash-builds/cabal-test-plugin-recomp/dist-newstyle/build/x86_64-linux/ghc-8.10.2/p-0.1.0.0/build/Lib.o, /home/matt/ghc-hash-builds/cabal-test-plugin-recomp/dist-newstyle/build/x86_64-linux/ghc-8.10.2/p-0.1.0.0/build/Lib.dyn_o )
Configuring executable 'q' for q-0.1.0.0..
Warning: The 'license-file' field refers to the file 'LICENSE' which does not
exist.
Preprocessing executable 'q' for q-0.1.0.0..
GHCi, version 8.10.2: https://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling Plugin ( Plugin.hs, interpreted )
[2 of 2] Compiling Main ( Main.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 8.10.2:
mkPluginUsage: file not found
Plugin /home/matt/ghc-hash-builds/cabal-test-plugin-recomp/dist-newstyle/build/x86_64-linux/ghc-8.10.2/q-0.1.0.0/x/q/build/q/q-tmp/Plugin.o
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable
pprPanic, called at compiler/deSugar/DsUsage.hs:235:15 in ghc:DsUsage
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug