[GHC] #16093: mkPluginUsage: file not found
GHC
ghc-devs at haskell.org
Sun Dec 30 19:00:17 UTC 2018
#16093: mkPluginUsage: file not found
-------------------------------------+-------------------------------------
Reporter: lerkok | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by lerkok):
Some further bad news; this impacts `haddock` as well:
{{{
$ haddock --optghc="-package ghc" Test.hs
Haddock coverage:
Warning: Package name is not available.
0% ( 0 / 2) in 'TestPlugin'
Missing documentation for:
Module header
plugin (./TestPlugin.hs:5)
haddock: ^^ Could not load '_TestPlugin_plugin_closure', dependency
unresolved. See top entry above.
}}}
There's a related cabal issue:
https://github.com/haskell/cabal/issues/888, which suggests adding `{-#
LANGUAGE TemplateHaskell #-}` to the `Test.hs` program though it should
not be necessary. But doing so doesn't help either. With this `Test.hs`
file:
{{{#!hs
{-# OPTIONS_GHC -fplugin TestPlugin #-}
{-# LANGUAGE TemplateHaskell #-} -- shouldn't be needed, but let's try
main :: IO ()
main = return ()
}}}
`cabal` now says:
{{{
[istanbul]~/qq>haddock --optghc="-package ghc" Test.hs
Haddock coverage:
Warning: Package name is not available.
0% ( 0 / 2) in 'TestPlugin'
Missing documentation for:
Module header
plugin (./TestPlugin.hs:5)
haddock: panic! (the 'impossible' happened)
(GHC version 8.6.3 for x86_64-apple-darwin):
mkPluginUsage: file not found
TestPlugin
/var/folders/ty/r22vmk1j7kxc60j8f5l3wgzc0000gn/T/.haddock-85267/TestPlugin.o
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in
ghc:Outputable
pprPanic, called at compiler/deSugar/DsUsage.hs:234:15 in
ghc:DsUsage
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
So, we're back to square one here. Unfortunately, the workaround of "first
create a .o" file doesn't really work in this context as I don't think
that's something I can instruct `haddock` to do; much less if it's coming
from `cabal haddock`.
Really stumped on how to proceed here.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16093#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list