-ddump-json

Ben Gamari ben at well-typed.com
Fri Jan 29 19:50:52 UTC 2021


Richard Eisenberg <rae at richarde.dev> writes:

> Hi devs,
>
> In my work with Alfredo at revising our error message infrastructure,
> we ran across some code that renders error messages as JSON. Given
> that our data structures are changing, it seems natural to change the
> JSON output, too, but it's unclear whether that's wise. The manual
> currently lists -ddump-json in the chapter on "Debugging the
> compiler", suggesting that a change is fine, but I'm not yet
> convinced.
>
I think it would be fine to change the output. However, note that there
is a reason why this flag is in the -d flag namespace and the "Debugging
the compiler". The output is quite unstructured and we reserve the right to
change the representation, largely because it was hard to do better
without first fixing #8809.

After we have the new rich errors infrastucture in place I think we will
be in a much better place to discuss a properly-supported flag (via the
proposal process, presumably). However, I think when we do so we should
be careful to constrain the scope of the provided output. GHC is not a
language server and I don't think it would be wise to make it one.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210129/feab6c43/attachment.sig>


More information about the ghc-devs mailing list