Skip to content

-ddump-json is underspecified

GHC supports producing JSON output through its -ddump-json flag. This has the potential to be very useful to e.g. IDEs who want to consume GHC's error messages.

However, the feature right now seems too underspecified to use:

  • It is documented in the manual chapter on "Debugging the compiler", which seems not to be its primary use case.
  • There is no specification of what the JSON output should be, thus making the output hard to consume.
  • A recent query on ghc-devs produced minimal response, suggesting it is not in use.
  • Even if we had all the above, we would also need a process by which to update the specification, without causing undue harm to clients.

I thus propose to either find a client who can help build the specification of this feature -- and then document the specification and advertise the feature -- or to kill it entirely. As it stands today, the feature seems essentially useless.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information