Simon Hengel pushed to branch wip/sol/remove-ddump-json at Glasgow Haskell Compiler / GHC Commits: f99e4bae by Simon Hengel at 2025-08-09T16:50:20+07:00 Refactoring: Don't misuse `MCDiagnostic` for lint messages `MCDiagnostic` is meant to be used for compiler diagnostics. Any code that creates `MCDiagnostic` directly, without going through `GHC.Driver.Errors.printMessage`, side steps `-fdiagnostics-as-json` (see e.g. !14475, !14492 !14548). To avoid this in the future I want to control more narrowly who creates `MCDiagnostic` (see #24113). Some parts of the compiler use `MCDiagnostic` purely for formatting purposes, without creating any real compiler diagnostics. This change introduces a helper function, `formatDiagnostic`, that can be used in such cases instead of constructing `MCDiagnostic`. - - - - - a5393c7b by Simon Hengel at 2025-08-09T16:50:40+07:00 Rename MCDiagnostic to UnsafeMCDiagnostic - - - - - 3b67a005 by Simon Hengel at 2025-08-09T16:50:40+07:00 Remove -ddump-json (fixes #24113) - - - - - e06295d3 by Simon Hengel at 2025-08-09T16:50:40+07:00 Add SrcSpan to MCDiagnostic - - - - - 8c0d0320 by Simon Hengel at 2025-08-09T16:50:40+07:00 Refactoring: More consistently use logOutput, logInfo, fatalErrorMsg - - - - - e61d74f4 by Simon Hengel at 2025-08-09T16:50:40+07:00 Get rid of mkLocMessage - - - - - 26fe025d by Simon Hengel at 2025-08-09T16:50:40+07:00 Add Message data type - - - - - 0fe6bd7f by Simon Hengel at 2025-08-09T16:50:40+07:00 Get rid of MessageClass - - - - - 8e45d9f3 by Simon Hengel at 2025-08-09T16:50:40+07:00 Rename DiagnosticMessage to GenericDiagnosticMessage - - - - - 42b5dedb by Simon Hengel at 2025-08-09T16:50:40+07:00 Remove JSON logging - - - - - 36 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/Monad.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Errors.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Monad.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Pipeline/LogQueue.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Runtime/Debugger.hs - compiler/GHC/Stg/Lint.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Types/SourceError.hs - compiler/GHC/Utils/Error.hs - compiler/GHC/Utils/Logger.hs - docs/users_guide/debugging.rst - ghc/GHCi/UI.hs - ghc/GHCi/UI/Exception.hs - testsuite/tests/driver/T16167.stderr - − testsuite/tests/driver/T16167.stdout - testsuite/tests/driver/all.T - testsuite/tests/driver/json2.stderr - − testsuite/tests/driver/json_dump.hs - − testsuite/tests/driver/json_dump.stderr - utils/check-exact/Main.hs - utils/check-exact/Preprocess.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3a82a3d650fe6703cf0369ecf31e5e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3a82a3d650fe6703cf0369ecf31e5e... You're receiving this email because of your account on gitlab.haskell.org.