[commit: ghc] master: Add a flag to emit error messages as JSON (9169111)

git at git.haskell.org git at git.haskell.org
Mon Jan 30 19:02:59 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/91691117fc194c525f58ccd5b266dd1d10493e5a/ghc

>---------------------------------------------------------------

commit 91691117fc194c525f58ccd5b266dd1d10493e5a
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Mon Jan 30 11:53:17 2017 -0500

    Add a flag to emit error messages as JSON
    
    This patch adds the flag `-ddump-json` which dumps all the compiler
    output as a JSON array. This allows tooling to more easily parse GHC's
    output to display to users.
    
    The flag is currently experimental and will hopefully be refined for the
    next release.  In particular I have avoided any changes which involve
    significant refactoring and provided what is easy given the current
    infrastructure.
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: DanielG, gracjan, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3010
    
    GHC Trac Issues: #13190


>---------------------------------------------------------------

91691117fc194c525f58ccd5b266dd1d10493e5a
 compiler/basicTypes/SrcLoc.hs                      | 14 ++++
 compiler/ghc.cabal.in                              |  1 +
 compiler/ghc.mk                                    |  1 +
 compiler/main/DynFlags.hs                          | 98 +++++++++++++++++++++-
 compiler/main/DynFlags.hs-boot                     |  1 +
 compiler/main/ErrUtils.hs                          |  8 ++
 compiler/main/ErrUtils.hs-boot                     |  7 +-
 compiler/main/GHC.hs                               |  1 +
 compiler/utils/Json.hs                             | 54 ++++++++++++
 docs/users_guide/8.2.1-notes.rst                   |  4 +
 docs/users_guide/debugging.rst                     |  6 ++
 testsuite/tests/driver/all.T                       |  2 +
 .../{ghci/scripts/ghci038.hs => driver/json.hs}    |  5 +-
 testsuite/tests/driver/json.stderr                 |  8 ++
 testsuite/tests/driver/json2.hs                    |  4 +
 testsuite/tests/driver/json2.stderr                |  9 ++
 16 files changed, 218 insertions(+), 5 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 91691117fc194c525f58ccd5b266dd1d10493e5a


More information about the ghc-commits mailing list