rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.31k stars 94 forks source link

Exception on syntax error #327

Closed cdfa closed 5 years ago

cdfa commented 5 years ago

Main.hs

module Main where

import Lib

-- error ---\/
main :: IO (
main = someFunc

Lib.hs

module Lib
    ( someFunc
    ) where

someFunc :: IO ()
someFunc = putStrLn "someFunc"

Stacktrace

spray.json.DeserializationException: Expected String as JsString, but got []
    at spray.json.package$.deserializationError(package.scala:23)
    at spray.json.ProductFormats.fromField(ProductFormats.scala:62)
    at spray.json.ProductFormats.fromField$(ProductFormats.scala:50)
    at intellij.haskell.external.component.HLintComponent$HlintJsonProtocol$.fromField(HLintComponent.scala:54)
    at spray.json.ProductFormatsInstances$$anon$12.read(ProductFormatsInstances.scala:375)
    at spray.json.ProductFormatsInstances$$anon$12.read(ProductFormatsInstances.scala:356)
    at spray.json.JsValue.convertTo(JsValue.scala:31)
    at spray.json.CollectionFormats$$anon$4.$anonfun$read$4(CollectionFormats.scala:89)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.Iterator.foreach(Iterator.scala:929)
    at scala.collection.Iterator.foreach$(Iterator.scala:929)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
    at scala.collection.IterableLike.foreach(IterableLike.scala:71)
    at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractTraversable.map(Traversable.scala:104)
    at spray.json.CollectionFormats$$anon$4.read(CollectionFormats.scala:89)
    at spray.json.CollectionFormats$$anon$4.read(CollectionFormats.scala:86)
    at spray.json.JsValue.convertTo(JsValue.scala:31)
    at intellij.haskell.external.component.HLintComponent$.deserializeHLintInfo(HLintComponent.scala:65)
    at intellij.haskell.external.component.HLintComponent$.$anonfun$check$1(HLintComponent.scala:45)
    at scala.Option.map(Option.scala:146)
    at intellij.haskell.external.component.HLintComponent$.check(HLintComponent.scala:36)
    at intellij.haskell.inspection.HLintInspectionTool$$anon$1.call(HLintInspectionTool.scala:51)
    at intellij.haskell.inspection.HLintInspectionTool$$anon$1.call(HLintInspectionTool.scala:48)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:337)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
rikvdkleij commented 5 years ago

This is fixed in latest betas. See here how to install https://github.com/rikvdkleij/intellij-haskell#installing-latest-beta-of-the-plugin

rikvdkleij commented 5 years ago

Can this issue be closed?

cdfa commented 5 years ago

Not until it's fixed in the released version I'd say. Maybe mark it as fixed in beta though