atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haskell-ghc-mod: ghc-mod command lint failed with error Error #173

Closed happygirlzt closed 6 years ago

happygirlzt commented 7 years ago
caps: {"version":[5,5,0,0],"fileMap":true,"quoteArgs":true,"optparse":true,"typeConstraints":false,"browseParents":false,"interactiveCaseSplit":false}
URI: C:\Users\guan\Desktop\hh.hs
Args: --,--hlintOpt,C:\Users\guan\AppData\Roaming\stack\snapshots\x86_64-windows\lts-6.14\7.10.2\bin\hlint.exe
message: Command failed: C:\Users\guan\AppData\Roaming\stack\snapshots\x86_64-windows\lts-6.14\7.10.2\bin\ghc-mod.exe --map-file C:\Users\guan\Desktop\hh.hs lint C:\Users\guan\Desktop\hh.hs -- --hlintOpt C:\Users\guan\AppData\Roaming\stack\snapshots\x86_64-windows\lts-6.14\7.10.2\bin\hlint.exe
ghc-mod: C:\Users\guan\AppData\Roaming\stack\snapshots\x86_64-windows\lts-6.14\7.10.2\bin\hlint.exe: hGetContents: invalid argument (invalid byte sequence)
log:
-28.152s: {}
-28.152s: "Running C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,check,C:\\Users\\guan\\Desktop\\hh.hs,-- with opts = ",{"cwd":"C:\\Users\\guan\\Desktop","env":{"1830B7BD-F7A3-4c4d-989B-C004DE465EDE":"940:99445c0","ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\guan\\AppData\\Roaming","ATOM_HOME":"C:\\Users\\guan\\.atom","CLASSPATH":".;C:\\Program Files\\Java\\jdk1.8.0_101\\lib;C:\\Program Files\\Java\\jdk1.8.0_101\\lib\\dt.jar;C:\\Program Files\\Java\\jdk1.8.0_101\\lib\\tools.jar","CommonProgramFiles":"C:\\Program Files (x86)\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"HAPPYGIRLZT","ComSpec":"C:\\Windows\\system32\\cmd.exe","FP_NO_HOST_CHECK":"NO","GOOGLE_API_KEY":"AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\guan","JAVA_HOME":"C:\\Program Files\\Java\\jdk1.8.0_101","LOCALAPPDATA":"C:\\Users\\guan\\AppData\\Local","LOGONSERVER":"\\\\HAPPYGIRLZT","Maven_Home":"F:\\apache-maven-3.3.9","NODE_ENV":"production","NODE_PATH":"C:\\Users\\guan\\AppData\\Local\\atom\\app-1.10.0\\resources\\app.asar\\exports","NUMBER_OF_PROCESSORS":"4","OS":"Windows_NT","Path":"C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;F:\\Git\\cmd;D:\\Python;D:\\Python\\Scripts;E:\\MiKTeX\\miktex\\bin\\;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\gnuplot\\binary;D:\\pythonxy\\SciTE-3.5.1-4;D:\\pythonxy\\console;F:\\mpg123;C:\\Users\\guan\\AppData\\.atom;F:\\8.0.1\\bin;F:\\8.0.1\\lib\\extralibs\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\switch;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\cmd;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\usr\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\mingw\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal\\bin;C:\\Users\\guan\\AppData\\Roaming\\local\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\jre\\bin;F:\\apache-maven-3.3.9\\bin;D:\\Python;C:\\Users\\guan\\AppData\\Local\\atom\\bin","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW","PROCESSOR_ARCHITECTURE":"x86","PROCESSOR_ARCHITEW6432":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 60 Stepping 3, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"3c03","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files (x86)","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PSModulePath":"C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\","PUBLIC":"C:\\Users\\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\guan\\AppData\\Local\\Temp","TMP":"C:\\Users\\guan\\AppData\\Local\\Temp","USERDOMAIN":"HAPPYGIRLZT","USERNAME":"guan","USERPROFILE":"C:\\Users\\guan","windir":"C:\\Windows","windows_tracing_flags":"3","windows_tracing_logfile":"C:\\BVTBin\\Tests\\installpackage\\csilogfile.log","PATH":"F:\\8.0.1\\bin\\;C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;F:\\Git\\cmd;D:\\Python;D:\\Python\\Scripts;E:\\MiKTeX\\miktex\\bin\\;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\gnuplot\\binary;D:\\pythonxy\\SciTE-3.5.1-4;D:\\pythonxy\\console;F:\\mpg123;C:\\Users\\guan\\AppData\\.atom;F:\\8.0.1\\bin;F:\\8.0.1\\lib\\extralibs\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\switch;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\cmd;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\usr\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\mingw\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal\\bin;C:\\Users\\guan\\AppData\\Roaming\\local\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\jre\\bin;F:\\apache-maven-3.3.9\\bin;C:\\Users\\guan\\AppData\\Local\\atom\\bin"},"encoding":"utf-8","maxBuffer":null}
-27.97s: "sending stdin text to C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,check,C:\\Users\\guan\\Desktop\\hh.hs,--"
-27.703s: "Got response from C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,check,C:\\Users\\guan\\Desktop\\hh.hs,--",{"stdout":"","stderr":""}
-0.353s: {}
-0.353s: "Running C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,lint,C:\\Users\\guan\\Desktop\\hh.hs,--,--hlintOpt,C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe with opts = ",{"cwd":"C:\\Users\\guan\\Desktop","env":{"1830B7BD-F7A3-4c4d-989B-C004DE465EDE":"940:99445c0","ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\guan\\AppData\\Roaming","ATOM_HOME":"C:\\Users\\guan\\.atom","CLASSPATH":".;C:\\Program Files\\Java\\jdk1.8.0_101\\lib;C:\\Program Files\\Java\\jdk1.8.0_101\\lib\\dt.jar;C:\\Program Files\\Java\\jdk1.8.0_101\\lib\\tools.jar","CommonProgramFiles":"C:\\Program Files (x86)\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"HAPPYGIRLZT","ComSpec":"C:\\Windows\\system32\\cmd.exe","FP_NO_HOST_CHECK":"NO","GOOGLE_API_KEY":"AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\guan","JAVA_HOME":"C:\\Program Files\\Java\\jdk1.8.0_101","LOCALAPPDATA":"C:\\Users\\guan\\AppData\\Local","LOGONSERVER":"\\\\HAPPYGIRLZT","Maven_Home":"F:\\apache-maven-3.3.9","NODE_ENV":"production","NODE_PATH":"C:\\Users\\guan\\AppData\\Local\\atom\\app-1.10.0\\resources\\app.asar\\exports","NUMBER_OF_PROCESSORS":"4","OS":"Windows_NT","Path":"C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;F:\\Git\\cmd;D:\\Python;D:\\Python\\Scripts;E:\\MiKTeX\\miktex\\bin\\;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\gnuplot\\binary;D:\\pythonxy\\SciTE-3.5.1-4;D:\\pythonxy\\console;F:\\mpg123;C:\\Users\\guan\\AppData\\.atom;F:\\8.0.1\\bin;F:\\8.0.1\\lib\\extralibs\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\switch;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\cmd;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\usr\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\mingw\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal\\bin;C:\\Users\\guan\\AppData\\Roaming\\local\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\jre\\bin;F:\\apache-maven-3.3.9\\bin;D:\\Python;C:\\Users\\guan\\AppData\\Local\\atom\\bin","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW","PROCESSOR_ARCHITECTURE":"x86","PROCESSOR_ARCHITEW6432":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 60 Stepping 3, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"3c03","ProgramData":"C:\\ProgramData","ProgramFiles":"C:\\Program Files (x86)","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PSModulePath":"C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\","PUBLIC":"C:\\Users\\Public","SESSIONNAME":"Console","SystemDrive":"C:","SystemRoot":"C:\\Windows","TEMP":"C:\\Users\\guan\\AppData\\Local\\Temp","TMP":"C:\\Users\\guan\\AppData\\Local\\Temp","USERDOMAIN":"HAPPYGIRLZT","USERNAME":"guan","USERPROFILE":"C:\\Users\\guan","windir":"C:\\Windows","windows_tracing_flags":"3","windows_tracing_logfile":"C:\\BVTBin\\Tests\\installpackage\\csilogfile.log","PATH":"F:\\8.0.1\\bin\\;C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;F:\\Git\\cmd;D:\\Python;D:\\Python\\Scripts;E:\\MiKTeX\\miktex\\bin\\;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\gnuplot\\binary;D:\\pythonxy\\SciTE-3.5.1-4;D:\\pythonxy\\console;F:\\mpg123;C:\\Users\\guan\\AppData\\.atom;F:\\8.0.1\\bin;F:\\8.0.1\\lib\\extralibs\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\switch;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\cmd;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\git-2.4.5.1\\usr\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\mingw\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\ghc-7.10.2\\bin;C:\\Users\\guan\\AppData\\Local\\Programs\\minghc-7.10.2-x86_64\\bin;C:\\Users\\guan\\AppData\\Roaming\\cabal\\bin;C:\\Users\\guan\\AppData\\Roaming\\local\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\bin;C:\\Program Files\\Java\\jdk1.8.0_101\\jre\\bin;F:\\apache-maven-3.3.9\\bin;C:\\Users\\guan\\AppData\\Local\\atom\\bin"},"encoding":"utf-8","maxBuffer":null}
-0.172s: "sending stdin text to C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,lint,C:\\Users\\guan\\Desktop\\hh.hs,--,--hlintOpt,C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe"
-0.016s: "ghc-mod: C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe: hGetContents: invalid argument (invalid byte sequence)\r\n"
-0.016s: "Running C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file,C:\\Users\\guan\\Desktop\\hh.hs,lint,C:\\Users\\guan\\Desktop\\hh.hs,--,--hlintOpt,C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe failed with ",{"killed":false,"code":1,"signal":null,"cmd":"C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file C:\\Users\\guan\\Desktop\\hh.hs lint C:\\Users\\guan\\Desktop\\hh.hs -- --hlintOpt C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe"}
0s: {"killed":false,"code":1,"signal":null,"cmd":"C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\ghc-mod.exe --map-file C:\\Users\\guan\\Desktop\\hh.hs lint C:\\Users\\guan\\Desktop\\hh.hs -- --hlintOpt C:\\Users\\guan\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-6.14\\7.10.2\\bin\\hlint.exe"}
Hide Stack Trace
Error
    at file:///C:/Users/guan/.atom/packages/haskell-ghc-mod/lib/util.coffee:60:26
    at ChildProcess.exithandler (child_process.js:221:5)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
lierdakil commented 7 years ago

You should really use code environment for long logs...

Issue itself seems to be the same as #155. It should be fixed by ghc-mod-5.6.0.0, but since you're using stack's lts snapshot, it's probably not in there yet. By the way, I thought 6.14 used ghc-7.10.3 by default?

Anyway, you can install ghc-mod-5.6.0.0 with stack build ghc-mod-5.6.0.0 cabal-helper-0.7.2.0 in stack project directory, which should build that in .stack-work. Please check if it helps.

happygirlzt commented 7 years ago

Sorry, that was my first time to add a issue... Firstly, thank you very much... Secondly, I think I encountered anthor problem. When I tried to use stack , it often shows the following information:

"GHC version mismatched, found 8.0.1(x86_64), but expected version 7.10.3...Try running stack setup" I searched the Internet and changed the stack.yaml. I changed theresolver: lts-6.14 into resolver: nightly-2016-09-01 then, I will get the following error messages: After installing Cabal, the package id could't be found(via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug Sign...I think the greatest problem is that I am not familiar with Haskell...Maybe, only I learn Haskell more can I really understand these operations. Anyway, thanks a lot. : )

lierdakil commented 7 years ago

How did you install GHC anyway? When using stack it's advised to use it to install relevant GHC version (using stack setup inside a project -- or optionally specifying a resolver, e.g. stack setup --resolver=nightly)