Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21035

"Unexpected header line" sometimes with Haskell HIE

    XMLWordPrintable

Details

    • Linux/X11
    • d490319db6d44e56349339ea8367a14f7043c11b, 8c1edd5c545dc139e803994079a5222b7b08edc7

    Description

      Last part of the communication log:

      ...
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 191
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[]},"method":"textDocument/publishDiagnostics"}
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 273
      
      {"id":"{45fdaf15-5db5-4d00-9209-978da8001209}","jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":9,"line":10},"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs"}}}
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 393
      
      {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"text":"module Main where\n\nblah :: IO ()\nblah = putStrLn \"hello world\"\n\nfoo :: String\nfoo = blah\n  where blah = \"blah\"\n\nmain :: IO ()\nmain = do\n  putStrLn foo\n"}],"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","version":16}}}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 75
      
      {"result":[],"jsonrpc":"2.0","id":"{45fdaf15-5db5-4d00-9209-978da8001209}"}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 376
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[{"severity":1,"range":{"start":{"line":10,"character":7},"end":{"line":10,"character":8}},"source":"ghcmod","message":"Variable not in scope: d :: (String -> IO ()) -> String -> IO ()"}]},"method":"textDocument/publishDiagnostics"}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 587
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[{"severity":1,"range":{"start":{"line":10,"character":7},"end":{"line":10,"character":8}},"source":"ghcmod","message":"Variable not in scope: d :: (String -> IO ()) -> String -> IO ()"},{"severity":3,"range":{"start":{"line":10,"character":7},"end":{"line":11,"character":14}},"code":"Redundant do","source":"hlint","message":"Redundant do\nFound:\n  do putStrLn foo\nWhy not:\n  putStrLn foo\n"}]},"method":"textDocument/publishDiagnostics"}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 401
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[{"severity":3,"range":{"start":{"line":10,"character":7},"end":{"line":11,"character":14}},"code":"Redundant do","source":"hlint","message":"Redundant do\nFound:\n  do putStrLn foo\nWhy not:\n  putStrLn foo\n"}]},"method":"textDocument/publishDiagnostics"}
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 273
      
      {"id":"{47229cfa-5180-45f1-a2c8-8a6da15757a1}","jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":9,"line":11},"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs"}}}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 248
      
      {"result":[{"kind":2,"range":{"start":{"line":11,"character":2},"end":{"line":11,"character":10}}},{"kind":2,"range":{"start":{"line":3,"character":7},"end":{"line":3,"character":15}}}],"jsonrpc":"2.0","id":"{47229cfa-5180-45f1-a2c8-8a6da15757a1}"}
      overlay selections not in order
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 274
      
      {"id":"{aba4b71f-95d4-4330-a3f5-49a9b5d4f582}","jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":14,"line":11},"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs"}}}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 418
      
      {"result":[{"kind":3,"range":{"start":{"line":6,"character":0},"end":{"line":6,"character":3}}},{"kind":2,"range":{"start":{"line":11,"character":11},"end":{"line":11,"character":14}}},{"kind":3,"range":{"start":{"line":6,"character":0},"end":{"line":6,"character":3}}},{"kind":2,"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":3}}}],"jsonrpc":"2.0","id":"{aba4b71f-95d4-4330-a3f5-49a9b5d4f582}"}
      overlay selections not in order
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 273
      
      {"id":"{8885956f-bea8-491f-9a0a-22bfc36f5b19}","jsonrpc":"2.0","method":"textDocument/documentHighlight","params":{"position":{"character":2,"line":12},"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs"}}}
      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 397
      
      {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"text":"module Main where\n\nblah :: IO ()\nblah = putStrLn \"hello world\"\n\nfoo :: String\nfoo = blah\n  where blah = \"blah\"\n\nmain :: IO ()\nmain = do\n  putStrLn foo\n  \n"}],"textDocument":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","version":17}}}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 75
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: 
      
      
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: {"result":[],"jsonrpc":"2.0","id":"{8885956f-bea8-491f-9a0a-22bfc36f5b19}"}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 401
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[{"severity":3,"range":{"start":{"line":10,"character":7},"end":{"line":11,"character":14}},"code":"Redundant do","source":"hlint","message":"Redundant do\nFound:\n  do putStrLn foo\nWhy not:\n  putStrLn foo\n"}]},"method":"textDocument/publishDiagnostics"}
      qtc.languageclient.messages: StdIOClient std out:
      
      qtc.languageclient.messages: Content-Length: 401
      
      {"jsonrpc":"2.0","params":{"uri":"file:///home/ziller/git/3rdparty/qtc-super/src/plugins/haskell/tests/manual/simple/src/Main.hs","diagnostics":[{"severity":3,"range":{"start":{"line":10,"character":7},"end":{"line":11,"character":14}},"code":"Redundant do","source":"hlint","message":"Redundant do\nFound:\n  do putStrLn foo\nWhy not:\n  putStrLn foo\n"}]},"method":"textDocument/publishDiagnostics"}
      

      resulted in

      LanguageClient h: Could not parse Json message 'unterminated string'
      LanguageClient h: Unexpected header line "cs"}"
      LanguageClient h: Could not parse Json message 'unterminated string'
      LanguageClient h: Unexpected header line "d}"}"
      LanguageClient h: Could not parse Json message 'illegal value'
      LanguageClient h: Unexpected header line "0a-22bfc36f5b19}"}"
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            con Eike Ziller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes