From 609e6225c44c8e90c3847400b8db832b308e9b32 Mon Sep 17 00:00:00 2001
From: Ben Bellick <benbellick@protonmail.com>
Date: Sun, 22 Oct 2023 17:28:29 -0500
Subject: [PATCH] Deprecate -ddump-json and introduce -fdiagnostics-as-json

Addresses #19278

This commit deprecates the underspecified -ddump-json flag and
introduces a newer, well-specified flag -fdiagnostics-as-json.

Also included is a JSON schema as part of the documentation.

The -ddump-json flag will be slated for removal shortly after this merge.
---
 compiler/GHC/Utils/Logger.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/GHC/Utils/Logger.hs b/compiler/GHC/Utils/Logger.hs
index f6db1880e195..97753fe850f6 100644
--- a/compiler/GHC/Utils/Logger.hs
+++ b/compiler/GHC/Utils/Logger.hs
@@ -463,7 +463,7 @@ defaultLogActionHPutStrDoc logflags asciiSpace h d
 -- -fdiagnostics-as-json. For temporary backwards compatibility while
 -- -ddump-json is being deprecated, `jsonLogAction` has been added in, but
 -- it should be removed along with -ddump-json. Similarly, the guard in
--- `defaultLogAction` should be removed.
+-- `defaultLogAction` should be removed. This cleanup is tracked in #24113.
 
 -- | Default action for 'dumpAction' hook
 defaultDumpAction :: DumpCache -> LogAction -> DumpAction
-- 
GitLab