[GHC] #14082: -ddump-json does not escape output properly

#14082: -ddump-json does not escape output properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- == Steps to reproduce This program {{{#!hs module StringError where q = "string" + "string" }}} Compiled with `-ddump-json`, produces this JSON output: {{{ [ {"span": {"file": "tmp.hs","startLine": 3,"startCol": 5,"endLine": 3,"endCol": 24},"doc": "\u2022 No instance for (Num [Char]) arising f rom a use of \u2018+\u2019\n\u2022 In the expression: "string" + "string"\n In an equation for \u2018q\u2019: q = "string" + "string""," severity": "SevError","reason": null}] }}} It is not valid JSON, because `"string"` occured in a JSON string, but the quotes are not escaped. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14082: -ddump-json does not escape output properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dramforever): Looks like https://phabricator.haskell.org/diffusion/GHC/browse/master/compiler/utils/J... A typo causes `"` to be escaped to `"`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14082: -ddump-json does not escape quotes properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dramforever): Changing title to reflect my best guess -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14082: -ddump-json does not escape quotes properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => merge * milestone: => 8.2.2 Comment: Fixed in e8fe12f83b17dc39d9272d44c4168946fa54e7a0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14082: -ddump-json does not escape quotes properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: JSON Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * keywords: => JSON -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14082: -ddump-json does not escape quotes properly -------------------------------------+------------------------------------- Reporter: dramforever | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: JSON Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.2` as 3920225b39e83f8a759218b6ab5411cac7c80df1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14082#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC