[GHC] #14097: -ddump-json doesn't interact as expected with -ddump-to-file

GHC ghc-devs at haskell.org
Mon Aug 7 11:45:40 UTC 2017


#14097: -ddump-json doesn't interact as expected with -ddump-to-file
-------------------------------------+-------------------------------------
           Reporter:  mpickering     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:  JSON           |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Usually with dump flags, if you set `ddump-to-file` then the dumped file
 will be outputted in the current directory if `-dumpdir` or `-ddump-file-
 prefix` is not set. This doesn't work with `-ddump-json`, if you do not
 specify
 `-ddump-file-prefix` then the output is always on stdout.

 Clearly stated, here are the two problems which I think have the same
 solution.

 1. `-ddump-to-file -ddump-json` should output a file in the currect
 directory.
 2. `-ddump-to-file -ddump-json` does not respect `-dumpdir`

 It seems that a stale set of DynFlags is used to direct the output of
 `-ddump-json`. The relevant function is `DynFlags.jsonLogFinaliser`.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14097>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list