haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with HLS, Stack and Path_* module

awgn opened this issue · comments

Hi there,

It seems that after the latest update, HLS no longer works with my stack projects.

No matter if I create the configuration manually or if I use gen-hie supplying hie.yaml file. I always get the following error shown in vscode problems window:

Multi Cradle: No prefixes matched
pwd: /Users/admin/GitLab/Horta
filepath: /Users/admin/GitLab/Horta/src/Main.hs
prefixes:
("./src/Main.hs", Stack {component = Just "horta:exe:horta", stackYaml = Nothing})
...

After this the plugin does not work, mouse over does not resolve types, etc.

My Environment

/Users/admin/Library/Application\ Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.5.0-darwin-8.8.3 --probe-tools
haskell-language-server version: 0.5.0.0 (GHC: 8.8.3) (PATH: /Users/admin/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.5.0-darwin-8.8.3) (GIT hash: 14497f2503a2a0d389fabf3b146d674b9af41a34)
Tool versions found on the $PATH
cabal:          2.4.1.0
stack:          2.3.3
ghc:            Not found
  • Visual Studio Code for MacOS

  • stack.yaml

resolver: lts-15.13
packages:
- '.'

extra-deps: 
- bounded-tchan-0.2.3
- vector-strategies-0.4
- git: https://github.com/haskell-works/hw-kafka-client.git 
  commit: 2d33327f94802048aeb6b5818db381edca544db7  # master
- './vegoia-tree-lib'
- './vegoia-label'

# Override default flag values for local packages and extra-deps
flags:
   aeson:
     cffi: true

# Extra package databases containing global packages
extra-package-dbs: []

extra-include-dirs:
- /usr/local/opt/openssl/include
  
extra-lib-dirs: 
-  /usr/local/opt/openssl/lib 
-  /usr/local/lib
-  ./lib 

rebuild-ghc-options: true
  • horta.cabal
name:                horta
version:             3.24.1
-- synopsis:
-- description:
homepage:            https://github.com/githubuser/horta#readme
license-file:        LICENSE
author:              Author name here
maintainer:          nicola.bonelli@larthia.com
copyright:           2018 Nicola Bonelli
category:            Web
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:  README.md 

flag UseLicense {
    Description: "Compile with lasa license"
    Default: False
}

executable horta
  hs-source-dirs:      src
  main-is:             Main.hs
  other-modules:      
                       Horta.Icmp
                       Horta.Flow
                       Horta.Event
                       Horta.Flow.Aeson
                       Horta.SmallFlow
                       Horta.StandardFlow
                       Horta.Ingester
                       ...
  default-language:    Haskell2010
  build-depends:       base >= 4.7 && < 5
                     , optparse-applicative
                     , safe
                     , safe-exceptions
                     , unordered-containers
                     , http-streams
                     , bytestring
                     , deepseq 
                     , text
                     , text-show
                     , split
                     , io-streams
                     , binary
                     , yaml
                     , scotty
                     , aeson
                     ....
                     
  Ghc-options:  -O2 
                -Wall 
                -Wmissing-deriving-strategies
                -funbox-strict-fields 
                -fwrite-ide-info 
                -hiedir=.hie
                -threaded 
                -rtsopts "-with-rtsopts=-N -qm -H1g -M2g" 

    extra-libraries:    rdkafka 

Thanks,
Nicola

You should try the latest stack release candidate (2.5) - can't tell from your description, but if you're using Paths_* modules, you won't be able to load them without it.

Indeed, I'm using Paths_ modules, and yes upgrading to the stack v2.5.0.1 (release candidate) it works!

Thanks!

See this issue if you're interested in more info - https://github.com/haskell/ghcide/issues/819

Update:

while upgrading stack to version 2.5.0.1 fixes the problem in the majority of my stack projects, in some (in which Path_ module is used) the issue persists.

This happens also with the most recent version of HLS (0.5.1).

Yet, no matter if I provide the hie.yaml or not. I always get the same error:

Multi Cradle: No prefixes matched
pwd: /Users/admin/GitLab/Horta
filepath: /Users/admin/GitLab/Horta/src/Main.hs
prefixes:
("./src/Main.hs", Stack {component = Just "horta:exe:horta", stackYaml = Nothing})
...

Any suggestion to work around this?
N.

What's your hie.yaml, and what's your project? If you could share both somewhere (as a reproducer) that would be great!

Unfortunately, I can't share the repository of the project as it is private.

However, the cradle is very simple:

cradle:
  stack:
    - path: "./src/Main.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.VFlow.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.VFlow.Aeson.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.VFlow.Serialise.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.Anomaly.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.ModFilters.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.Modbus.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.Http.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.Events.hs"
      component: "horta:exe:horta"

    - path: "./src/Vegoia.S3.hs"
      component: "horta:exe:horta"
      ...

The stack project, in addition to Path_ module, makes use of a couple of libraries as git submodules:

resolver: lts-15.13

packages:
- '.'

extra-deps:
- bounded-tchan-0.2.3
- vector-strategies-0.4
- './vegoia-lib'
- './vegoia-label'

# Override default flag values for local packages and extra-deps
flags:
   aeson:
     cffi: true

# Extra package databases containing global packages
extra-package-dbs: []

extra-include-dirs:
- /usr/local/opt/openssl/include

extra-lib-dirs:
-  /usr/local/opt/openssl/lib
-  /usr/local/lib
-  ./lib

rebuild-ghc-options: true

The cabal:

...
executable horta
  hs-source-dirs:      src
  main-is:             Main.hs
  other-modules:       Vegoia.VFlow
                       Vegoia.VFlow.Aeson
                       Vegoia.VFlow.Serialise
                       Vegoia.Anomaly
                       Vegoia.ModFilters
                       Vegoia.Modbus
                       Vegoia.Http
                       Vegoia.Events
                       ...
                       Paths_horta
                       Logger
                       Crypto
                       Murmur
                       Horta
                       Pretty
                       Util
 default-language:    Haskell2010
  build-depends:       base >= 4.7 && < 5
                     , optparse-applicative
                     , safe
                     , safe-exceptions
                     , unordered-containers
                     , http-streams
                     , bytestring
                     , deepseq
                     , text
                     , text-show
                     , split
                     , io-streams
                     , binary
                     , yaml
                      ...
 Ghc-options:  -O2
                -Wall
                -Wmissing-deriving-strategies
                -funbox-strict-fields
                -fwrite-ide-info
                -hiedir=.hie
                -threaded
                -rtsopts "-with-rtsopts=-N -qm -H1g -M2g"

The output:

[client] run command: "/Users/admin/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.5.1-darwin-8.8.3 --lsp -d"
[client] debug command: "/Users/admin/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.5.1-darwin-8.8.3 --lsp -d"
[client] server cwd: undefined
haskell-language-server version: 0.5.1.0 (GHC: 8.8.3) (PATH: /Users/admin/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.5.1-darwin-8.8.3) (GIT hash: e3fe0e7546aa91e44cc56cfe8ec078a026cf533a)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "importLens",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell",PluginId "tactic"]
  in directory: /Users/admin/GitLab/Horta
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 2020-10-13 12:02:17.509118 [ThreadId 5] - 




haskell-lsp:Starting up server ...
2020-10-13 12:02:17.510799 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":1806,"clientInfo":{"name":"vscode","version":"1.50.0"},"rootPath":"/Users/admin/GitLab/Horta","rootUri":"file:///Users/admin/GitLab/Horta","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"],"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"]}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///Users/admin/GitLab/Horta","name":"Horta"}]}}
2020-10-13 12:02:17.524105 [ThreadId 5] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/Users/admin/GitLab/Horta
Started LSP server in 0.02s
2020-10-13 12:02:17.752377 [ThreadId 21] - Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 604950210782722952 "file:///Users/admin/GitLab/Horta"], clientSettings = hashed Nothing}
2020-10-13 12:02:17.752726 [ThreadId 7] - <--2--{"result":{"capabilities":{"typeDefinitionProvider":true,"foldingRangeProvider":false,"textDocumentSync":{"openClose":true,"change":2,"save":{}},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"implementationProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["1923:eval:evalCommand","1923:ghcide:typesignature.add","1923:importLens:ImportLensCommand","1923:pragmas:addPragma","1923:retrie:retrieCommand","1923:tactic:tacticsAutoCommand","1923:tactic:tacticsIntrosCommand","1923:tactic:tacticsDestructCommand","1923:tactic:tacticsHomomorphismCommand","1923:tactic:tacticsDestructLambdaCaseCommand","1923:tactic:tacticsHomomorphismLambdaCaseCommand"]},"renameProvider":false,"colorProvider":false,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":false},"codeLensProvider":{},"documentSymbolProvider":true,"documentFormattingProvider":true}},"jsonrpc":"2.0","id":0}
2020-10-13 12:02:17.753194 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"initialized","params":{}}
2020-10-13 12:02:17.753418 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"registrations":[{"registerOptions":{"watchers":[{"kind":5,"globPattern":"**/*.hs"},{"kind":5,"globPattern":"**/*.hs-boot"},{"kind":5,"globPattern":"**/*.lhs"},{"kind":5,"globPattern":"**/*.lhs-boot"}]},"method":"workspace/didChangeWatchedFiles","id":"globalFileWatches"}]},"method":"client/registerCapability","id":0}
2020-10-13 12:02:17.753476 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"haskell":{"hlintOn":true,"maxNumberOfProblems":100,"diagnosticsOnChange":true,"liquidOn":false,"completionSnippetsOn":true,"formatOnImportOn":true,"formattingProvider":"ormolu","trace":{"server":"messages"},"logFile":"","languageServerVariant":"haskell-language-server","serverExecutablePath":"","updateBehavior":"keep-up-to-date","indentationRules":{"enabled":true},"hieVariant":"haskell-language-server","trace.server":"messages"}}}}
2020-10-13 12:02:17.753601 [ThreadId 21] - Configuration changed: Object (fromList [("haskell",Object (fromList [("trace.server",String "messages"),("logFile",String ""),("updateBehavior",String "keep-up-to-date"),("hieVariant",String "haskell-language-server"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "messages")]))]))])
2020-10-13 12:02:17.753907 [ThreadId 20] - Finishing build session(exception: AsyncCancelled)
2020-10-13 12:02:17.754324 [ThreadId 5] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///Users/admin/GitLab/Horta/src/Main.hs","languageId":"haskell","version":1,"text":"{-# LANGUAGE ForeignFunctionInterface #-}\n{-# LANGUAGE RecordWildCards #-}\n{-# LANGUAGE DataKinds #-}\n{-# LANGUAGE CPP #-}\n\nmodule Main (module Main) where\n\nimport           Horta.Flow\nimport qualified Horta.Environment as H\nimport qualified Horta.CmdLineOpt as H\nimport qualified Horta.Options as H\nimport qualified Horta.Config  as H\nimport qualified Horta.Logger  as H\nimport qualified Horta.WorkerConfig  as H\nimport qualified Horta.Queues  as H\nimport qualified Horta         as H\nimport Util\nimport Crypto\n\nimport Options.Applicative\nimport Data.Version (showVersion)\nimport Data.Maybe\nimport qualified Data.Vector as V\n\nimport Control.Monad\nimport Control.Concurrent\n\nimport Control.Monad.Trans.Reader\nimport Control.Monad.IO.Class\nimport Control.Exception.Safe\n\nimport qualified Data.Yaml as Y\nimport qualified Paths_horta as P\n\nimport OpenSSL (withOpenSSL)\nimport System.Posix.Signals\nimport System.Posix.Daemonize\nimport System.FilePath.Posix\nimport System.Log.FastLogger\nimport System.Directory (doesFileExist)\n\nimport Vegoia.Label\n\n#ifdef HORTA_USE_LICENSE\nimport Lasa.Crypto as L \n#endif\n\n\nmain :: IO ()\nmain = do\n#ifdef HORTA_USE_LICENSE\n    _ <- L.licenseCheck\n#else\n    putStrLn \"Free Horta!\"\n#endif\n    execParser opts >>= \\co -> mainRun (H.mkOptions co)\n    where opts = info (helper <*> H.parseCmdLineOptions)\n                      (fullDesc <> header \"Horta AI-Engine\")\n\nmainRun :: H.Options -> IO ()\nmainRun o@H.Options{..}\n  | version     = putStrLn $ showVersion P.version\n  | otherwise   = withOpenSSL $ do\n      conf <- Y.decodeFileEither configFile\n      case conf of\n        Left  e -> errorWithoutStackTrace $ Y.prettyPrintParseException e\n        Right c -> do\n\n          let opt = o <> H.mkOptions (c :: H.Config)\n\n              err = H.checkConsistency opt\n\n          maybe (return ()) fail err\n\n          -- finalize options, ingesters and reader Workers\n          --\n\n          let fopt = H.finalizeOptions opt\n\n          void $ installHandler sigHUP Ignore Nothing\n\n          -- load label DBs...\n\n          getDecryptedContent ((fromMaybe \".\" (H.models_path c)) </> \"label.0\") >>= buildLabelDB (DB :: Namespace \"app\") \n          getDecryptedContent ((fromMaybe \".\" (H.models_path c)) </> \"label.1\") >>= buildLabelDB (DB :: Namespace \"malware\") \n          getDecryptedContent ((fromMaybe \".\" (H.models_path c)) </> \"label.2\") >>= buildLabelDB (DB :: Namespace \"yara\") \n\n          chans <- createChannels fopt\n\n          if daemon\n                then daemonize $ runForever fopt chans\n                else runForever fopt chans\n\n\ncreateChannels :: H.Options -> IO (H.Chans (V.Vector Flow))\ncreateChannels H.Options{..} = V.replicateM queuesNumber (H.newBTChanIO qLen) :: IO (H.Chans (V.Vector Flow))\n    where qLen = 1 + fromMaybe 1023 queueLength\n\n\nrunForever :: H.Options -> H.Chans (V.Vector Flow) -> IO ()\nrunForever o@H.Options{..} chans = do\n\n  let inputURI  =  H.uri <$> readers\n  nfiles <- length . filter id <$> liftIO (mapM doesFileExist inputURI)\n\n  let always = daemon && nfiles == 0\n\n  foreverIf always $ do\n\n    timeCache <- newTimeCache simpleTimeFormat\n\n    let logtype = case logFile of\n                      (Just l) -> LogFile FileLogSpec{ log_file = l \n                                                     , log_file_size = 1000000\n                                                     , log_backup_number = 3 } 8192\n                      Nothing -> LogStdout 8192\n\n    let lstattype = case statFile of\n                      (Just s) -> LogFile FileLogSpec{ log_file = s\n                                                     , log_file_size = 1000000\n                                                     , log_backup_number = 3 } 8192\n                      Nothing -> LogStdout 8192\n\n    (logger, cleanlog)  <- newTimedFastLogger timeCache logtype\n    (lstat,  cleanstat) <- newTimedFastLogger timeCache lstattype\n\n    catchAny (\n            runReaderT (do\n                H.logMsgHortaIO \"[Horta] Horta is starting...\"\n                H.logMsgHortaIO $ \"[Horta] \" <> show o\n                H.runHorta chans nfiles\n                H.logMsgHortaIO \"[Horta] Terminated.\"\n            ) (H.HortaEnv logger lstat o)\n      ) (\\e -> H.logMsgIO logger o (\"[Horta] Exception: \" <> show e\n                                                          <> if always then \" (restarting in few seconds)\"\n                                                                       else \"\") *> threadDelay 5000000)\n\n    cleanlog\n    cleanstat\n\n"}}}
2020-10-13 12:02:17.754729 [ThreadId 21] - Restarting build session (aborting the previous one took 0.00s)
2020-10-13 12:02:17.781546 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":0,"result":null}
2020-10-13 12:02:17.782261 [ThreadId 21] - Set files of interest to: [(NormalizedFilePath "/Users/admin/GitLab/Horta/src/Main.hs",Modified)]
2020-10-13 12:02:17.782515 [ThreadId 5] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":0,\"result\":null}"
2020-10-13 12:02:17.782572 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///Users/admin/GitLab/Horta/src/Main.hs"}}}
2020-10-13 12:02:17.782655 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":2,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/admin/GitLab/Horta/src/Main.hs"},"range":{"start":{"line":75,"character":11},"end":{"line":75,"character":11}},"context":{"diagnostics":[]}}}
2020-10-13 12:02:17.782917 [ThreadId 21] - Restarting build session (aborting the previous one took 0.00s)
2020-10-13 12:02:17.782863 [ThreadId 36] - Finishing build session(exception: AsyncCancelled)
2020-10-13 12:02:17.783868 [ThreadId 21] - Opened text document: file:///Users/admin/GitLab/Horta/src/Main.hs
2020-10-13 12:02:17.785368 [ThreadId 83] - Consulting the cradle for "src/Main.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/Users/admin/GitLab/Horta", cradleOptsProg = CradleAction: Stack}
2020-10-13 12:02:17.786746 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"token":0},"method":"window/workDoneProgress/create","id":1}
2020-10-13 12:02:17.786842 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","cancellable":false,"title":"Setting up Horta (for src/Main.hs)"},"token":0},"method":"$/progress"}
2020-10-13 12:02:17.787083 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":1,"result":null}
2020-10-13 12:02:17.787146 [ThreadId 5] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":null}"
2020-10-13 12:02:17.889511 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"token":"3"},"method":"window/workDoneProgress/create","id":2}
2020-10-13 12:02:17.889597 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"begin","title":"Processing"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:17.891602 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":2,"result":null}
2020-10-13 12:02:17.891672 [ThreadId 5] - haskell-lsp:Got reply message:"{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":null}"
2020-10-13 12:02:17.992317 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"1/2"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:18.018468 [ThreadId 5] - ---> {"jsonrpc":"2.0","id":3,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///Users/admin/GitLab/Horta/src/Main.hs"}}}
2020-10-13 12:02:18.018619 [ThreadId 93] - Plugin.makeCodeLens (ideLogger)
> Using main module: 1. Package `horta' component horta:exe:horta with main-is file: /Users/admin/GitLab/Horta/src/Main.hs
> The following GHC options are incompatible with GHCi and have not been passed to it: -O2 -threaded
> Configuring GHCi with the following packages: horta
> /Users/admin/GitLab/Horta/.stack-work/install/x86_64-osx/bd8769dcd7a928c44c97fef5a71dce19793e57913169616e6c5d7e004766651d/8.8.3/pkgdb:/Users/admin/.stack/snapshots/x86_64-osx/bd8769dcd7a928c44c97fef5a71dce19793e57913169616e6c5d7e004766651d/8.8.3/pkgdb:/Users/admin/.stack/programs/x86_64-osx/ghc-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-10-13 12:02:21.016441 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":0},"method":"$/progress"}
2020-10-13 12:02:21.016337 [ThreadId 83] - Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/Users/admin/GitLab/Horta/.stack-work/odir","-hidir=/Users/admin/GitLab/Horta/.stack-work/odir","-hide-all-packages","-i/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/horta","-i/Users/admin/GitLab/Horta/src","-i/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/horta/autogen","-i/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/global-autogen","-i/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/horta/horta-tmp","-stubdir=/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build","-I/usr/local/opt/openssl/include","-lrdkafka","-L/usr/local/opt/openssl/lib","-L/usr/local/lib","-L/Users/admin/GitLab/Horta/./lib","-package-id=base-4.13.0.0","-package-id=optparse-applicative-0.15.1.0-8lufb1qPLmfiWdRsJZ50S","-package-id=safe-0.3.18-77EtIZs3AFB4iOmOvdspYk","-package-id=safe-exceptions-0.1.7.0-8Qc6QJ74Kec9lSAC96AGtO","-package-id=unordered-containers-0.2.10.0-KujsThAgCnwGXBG7PJnkNO","-package-id=http-streams-0.8.7.1-8b9C8l4Xy7A2V4lOBqjJGi","-package-id=bytestring-0.10.10.0","-package-id=deepseq-1.4.4.0","-package-id=text-1.2.4.0","-package-id=text-show-3.8.5-EkycLlZcgNEGXhArWAjPHd","-package-id=split-0.2.3.4-KyPtAwfJzED2zEIheQpqQL","-package-id=io-streams-1.5.1.0-68XAlwW1GuRAZrnu4kV3Sr","-package-id=binary-0.8.7.0","-package-id=yaml-0.11.4.0-CsiXew1WZzZ909v86f9sKe","-package-id=scotty-0.11.5-AblkhEsfK068jdZpDFNG1q","-package-id=aeson-1.4.7.1-HAJSqhGJW8MDizK65qPYzp","-package-id=network-3.1.1.1-H5yw1GXuMJB7JJ4oD68Cdy","-package-id=network-uri-2.6.3.0-CPjS2hnZr1IIlGhZ1dITqG","-package-id=stm-2.5.0.0","-package-id=HsOpenSSL-0.11.4.18-Js1sEPnDpUhSpdu6AtGAO","-package-id=unix-2.7.2.2","-package-id=hdaemonize-0.5.6-2QP1rIjDlQF6rIHnx0GZrf","-package-id=atomic-primops-0.8.3-CVMDt3kfBgru6ZOoHnhZ8","-package-id=time-1.9.3","-package-id=bounded-tchan-0.2.3-KXt3ZFVoPIE3RYJtCZiua","-package-id=transformers-0.5.6.2","-package-id=cereal-0.5.8.1-9ntckremgTg1GZyrWpwmPK","-package-id=zeromq4-haskell-0.8.0-6zZAvvIvogoGOBkrTpElGb","-package-id=fast-logger-3.0.1-9sEqhANOb1kFoPVwLmd5XW","-package-id=hslogger-1.3.1.0-E2VNWRKRfkD19ZwPSbU3v","-package-id=directory-1.3.6.0","-package-id=filepath-1.4.2.1","-package-id=vector-0.12.1.2-AWRYcz9jfa25Avs2q9Jg9V","-package-id=monad-loops-0.4.3-1E2zS5vP8vC8dPxRpEhLxP","-package-id=clock-0.8-BDr0ZJKaVWEAskyGHHBCXi","-package-id=hw-kafka-client-2.6.0-5QYB8ggkSiN78wDH2vBbGj","-package-id=lens-4.18.1-AAYx6JQhLmsLM4klqGDEGi","-package-id=tuple-0.3.0.2-Ilnc7BzDzeEJ8zBuKXCP9i","-package-id=retry-0.8.1.2-HtowviMXQRu1M5jMas8ZBp","-package-id=mtl-2.2.2","-package-id=unliftio-core-0.1.2.0-BfjjiCuGdFfJICKMeUQye4","-package-id=containers-0.6.2.1","-package-id=openssl-streams-1.2.2.0-HHJurW0QYcFCHiK8KEUQUd","-package-id=http-types-0.12.3-B9EkuT6UGia2QJglhdFRHH","-package-id=hashtables-1.2.3.4-CPjvEEdG2pTJVNzEPR7w1u","-package-id=hashable-1.3.0.0-CzctMgLWbfP4pv5F2JiKgj","-package-id=amazonka-1.6.1-Ai6Rb74CjnNLMNAoTB3VXn","-package-id=amazonka-core-1.6.1-DD327wGroZL7jTJ7s47CPv","-package-id=amazonka-s3-1.6.1-Kj5f0KwLtfE7j9lVKcfWI","-package-id=conduit-1.3.2-BZgyYqT5rdlIu7Mp6gCqGP","-package-id=conduit-extra-1.3.5-1VCRCsSdIs9EJDSOZ0tZO8","-package-id=http-conduit-2.3.7.3-6Ca5aBFbPc62ey64XyWx45","-package-id=monad-control-1.0.2.3-JO74YKryaba7Fk6tMO2Ac8","-package-id=resourcet-1.2.4-3SGwpxhUuMB8QaTt3NGu5y","-package-id=semigroups-0.19.1-KswQSjRjA2JDrzoYmnhZUy","-package-id=cassava-0.5.2.0-2PjwabWSp401VJzisLBWvM","-package-id=base64-bytestring-1.0.0.3-G2dYBQRtOn8Kxdm0ndZRY","-package-id=mono-traversable-1.0.15.1-KeyuOuWpLKUJmWKB6WZlhB","-package-id=cborg-0.2.3.0-LCvGOMpNAkT5HpnOVVMUEr","-package-id=serialise-0.2.3.0-29PPalNe50HAS7i99J8fjt","-package-id=colour-2.3.5-HwkwGdq0zHOAgUmo2lVa4V","-package-id=ansi-terminal-0.10.3-9zJT3Osp5wTAaMBIHKdPu2","-package-id=cryptonite-0.26-1BsgpeCLUsqwiNhmB6AoC","-package-id=memory-0.15.0-CYsfKCB0yso2kVJfbZEzwi","-package-id=ghc-compact-0.1.0.0","-package-id=vector-strategies-0.4-9kZGLgRyX0FDkBmpEbdGLb","-package-id=mongoDB-2.7.0.0-6u1JAQzNS6S7NsmcKrHAiA","-package-id=foldl-1.4.6-NMLlx7hwzJ7vJBWGkEsdF","-package-id=ip-1.7.1-slL0QvbnhyJzAGbSqB52M","-package-id=inflections-0.4.0.5-2G8wgoXLscQG1Q6ahs0uRK","-package-id=extra-1.6.21-EAREqxuPvj3IUeCVF5x2NJ","-package-id=base16-bytestring-0.1.1.6-J3g2X7BxmtW2I6DRkwScma","-package-id=vegoia-label-0.2.1.0-2PucyTXPEHr2ojBFnQDM5c","-package-id=vegoia-tree-lib-0.3.0.0-EhZ34shDtzmcJ1vogRAfq","-Wall","-Wmissing-deriving-strategies","-funbox-strict-fields","-fwrite-ide-info","-hiedir=.hie","-rtsopts","-with-rtsopts=-N -qm -H1g -M2g","-optP-include","-optP/Users/admin/GitLab/Horta/.stack-work/ghci/891dfc66/cabal_macros.h","-ghci-script=/private/var/folders/2z/07fmcpyj21s0064xb_fkrzjm0000gp/T/haskell-stack-ghci/4f6990f8/ghci-script","-package-db","/Users/admin/GitLab/Horta/.stack-work/install/x86_64-osx/bd8769dcd7a928c44c97fef5a71dce19793e57913169616e6c5d7e004766651d/8.8.3/pkgdb","-package-db","/Users/admin/.stack/snapshots/x86_64-osx/bd8769dcd7a928c44c97fef5a71dce19793e57913169616e6c5d7e004766651d/8.8.3/pkgdb","-package-db","/Users/admin/.stack/programs/x86_64-osx/ghc-8.8.3/lib/ghc-8.8.3/package.conf.d"], componentRoot = "/Users/admin/GitLab/Horta", componentDependencies = ["horta.cabal","package.yaml","stack.yaml"]},"/Users/admin/.stack/programs/x86_64-osx/ghc-8.8.3/lib/ghc-8.8.3")
2020-10-13 12:02:21.123391 [ThreadId 83] - Using interface files cache dir: /Users/admin/.cache/ghcide/main-eb95769215e7aa66cc7ccb01e9de929bd6bd84f0
2020-10-13 12:02:21.12379 [ThreadId 83] - Making new HscEnv[main]
2020-10-13 12:02:21.138634 [ThreadId 83] - New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("/Users/admin/GitLab/Horta/hie.yaml",Just 2020-10-13 09:42:47.451505469 UTC),("horta.cabal",Just 2020-10-06 12:49:20.827762575 UTC),("package.yaml",Nothing),("stack.yaml",Just 2020-09-04 13:27:25.218482653 UTC)])
2020-10-13 12:02:21.318778 [ThreadId 83] - Known files updated: fromList [(TargetModule Horta.Ingester.Elastic,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Elastic.hs"]),(TargetModule Horta.Stream,["/Users/admin/GitLab/Horta/src/Horta/Stream.hs"]),(TargetModule Horta.Reader.Basic,["/Users/admin/GitLab/Horta/src/Horta/Reader/Basic.hs"]),(TargetModule Horta.Stream.Identity,["/Users/admin/GitLab/Horta/src/Horta/Stream/Identity.hs"]),(TargetModule Horta.Stream.Trusted,["/Users/admin/GitLab/Horta/src/Horta/Stream/Trusted.hs"]),(TargetModule Vegoia.VFlow.Serialise,["/Users/admin/GitLab/Horta/src/Vegoia/VFlow/Serialise.hs"]),(TargetModule Murmur,["/Users/admin/GitLab/Horta/src/Murmur.hs"]),(TargetModule Horta.Ingester.File,["/Users/admin/GitLab/Horta/src/Horta/Ingester/File.hs"]),(TargetModule Horta.Icmp,["/Users/admin/GitLab/Horta/src/Horta/Icmp.hs"]),(TargetModule Vegoia.VFlow.Aeson,["/Users/admin/GitLab/Horta/src/Vegoia/VFlow/Aeson.hs"]),(TargetModule Crypto,["/Users/admin/GitLab/Horta/src/Crypto.hs"]),(TargetModule Horta.Ingester.Basic,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Basic.hs"]),(TargetModule Horta.Reader,["/Users/admin/GitLab/Horta/src/Horta/Reader.hs"]),(TargetModule Horta.Stream.DynDomain,["/Users/admin/GitLab/Horta/src/Horta/Stream/DynDomain.hs"]),(TargetModule Horta.Environment,["/Users/admin/GitLab/Horta/src/Horta/Environment.hs"]),(TargetModule Horta.Ingester.S3,["/Users/admin/GitLab/Horta/src/Horta/Ingester/S3.hs"]),(TargetModule Horta.Flow.Aeson,["/Users/admin/GitLab/Horta/src/Horta/Flow/Aeson.hs"]),(TargetModule Horta.Stats,["/Users/admin/GitLab/Horta/src/Horta/Stats.hs"]),(TargetModule Horta.Ingester.Features.BehaviorTwitter,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Features/BehaviorTwitter.hs"]),(TargetModule Horta.Queues,["/Users/admin/GitLab/Horta/src/Horta/Queues.hs"]),(TargetModule Horta.Stream.StreamingPlus,["/Users/admin/GitLab/Horta/src/Horta/Stream/StreamingPlus.hs"]),(TargetModule Horta.Ingester.MongoDB,["/Users/admin/GitLab/Horta/src/Horta/Ingester/MongoDB.hs"]),(TargetModule Horta.Ingester,["/Users/admin/GitLab/Horta/src/Horta/Ingester.hs"]),(TargetModule Horta.Stream.Malware,["/Users/admin/GitLab/Horta/src/Horta/Stream/Malware.hs"]),(TargetModule Lasa.Crypto,["/Users/admin/GitLab/Horta/src/Lasa/Crypto.hs"]),(TargetModule Vegoia.VFlow,["/Users/admin/GitLab/Horta/src/Vegoia/VFlow.hs"]),(TargetModule Horta.Stream.EthManuf,["/Users/admin/GitLab/Horta/src/Horta/Stream/EthManuf.hs"]),(TargetModule Logger,["/Users/admin/GitLab/Horta/src/Logger.hs"]),(TargetModule Horta.WorkerConfig,["/Users/admin/GitLab/Horta/src/Horta/WorkerConfig.hs"]),(TargetModule Horta.Flow,["/Users/admin/GitLab/Horta/src/Horta/Flow.hs"]),(TargetModule Horta.Ingester.Features.FlowSample,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Features/FlowSample.hs"]),(TargetModule Horta.Event,["/Users/admin/GitLab/Horta/src/Horta/Event.hs"]),(TargetModule Horta.Ingester.Features.EventSample,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Features/EventSample.hs"]),(TargetModule Horta,["/Users/admin/GitLab/Horta/src/Horta.hs"]),(TargetModule Horta.Options,["/Users/admin/GitLab/Horta/src/Horta/Options.hs"]),(TargetModule Horta.Stream.Stun,["/Users/admin/GitLab/Horta/src/Horta/Stream/Stun.hs"]),(TargetModule Horta.URI,["/Users/admin/GitLab/Horta/src/Horta/URI.hs"]),(TargetModule TextShow.Data.Priority,["/Users/admin/GitLab/Horta/src/TextShow/Data/Priority.hs"]),(TargetModule Horta.SmallFlow,["/Users/admin/GitLab/Horta/src/Horta/SmallFlow.hs"]),(TargetModule Horta.Stream.Yara,["/Users/admin/GitLab/Horta/src/Horta/Stream/Yara.hs"]),(TargetModule Horta.Ingester.Publisher,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Publisher.hs"]),(TargetModule Horta.Reader.ZMQ,["/Users/admin/GitLab/Horta/src/Horta/Reader/ZMQ.hs"]),(TargetModule Horta.Stream.EventCounters,["/Users/admin/GitLab/Horta/src/Horta/Stream/EventCounters.hs"]),(TargetModule Horta.Ingester.Extractor,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Extractor.hs"]),(TargetModule Horta.Stream.EThreat,["/Users/admin/GitLab/Horta/src/Horta/Stream/EThreat.hs"]),(TargetModule Vegoia.Events,["/Users/admin/GitLab/Horta/src/Vegoia/Events.hs"]),(TargetModule Vegoia.S3,["/Users/admin/GitLab/Horta/src/Vegoia/S3.hs"]),(TargetModule Pretty,["/Users/admin/GitLab/Horta/src/Pretty.hs"]),(TargetModule Horta.Stream.UserBehavior,["/Users/admin/GitLab/Horta/src/Horta/Stream/UserBehavior.hs"]),(TargetModule Horta.Ingester.InfluxDB,["/Users/admin/GitLab/Horta/src/Horta/Ingester/InfluxDB.hs"]),(TargetModule Horta.Stream.Strategy,["/Users/admin/GitLab/Horta/src/Horta/Stream/Strategy.hs"]),(TargetModule Horta.Stream.S3,["/Users/admin/GitLab/Horta/src/Horta/Stream/S3.hs"]),(TargetModule Vegoia.ModFilters,["/Users/admin/GitLab/Horta/src/Vegoia/ModFilters.hs"]),(TargetModule Horta.Ingester.Syslog,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Syslog.hs"]),(TargetModule Horta.Ingester.Features.StreamingSample,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Features/StreamingSample.hs"]),(TargetModule Horta.StandardFlow,["/Users/admin/GitLab/Horta/src/Horta/StandardFlow.hs"]),(TargetModule Horta.Reader.File,["/Users/admin/GitLab/Horta/src/Horta/Reader/File.hs"]),(TargetModule Horta.Ingester.Filter,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Filter.hs"]),(TargetModule Horta.Logger,["/Users/admin/GitLab/Horta/src/Horta/Logger.hs"]),(TargetModule Horta.Stream.MaliciousHost,["/Users/admin/GitLab/Horta/src/Horta/Stream/MaliciousHost.hs"]),(TargetModule Vegoia.Anomaly,["/Users/admin/GitLab/Horta/src/Vegoia/Anomaly.hs"]),(TargetModule Util,["/Users/admin/GitLab/Horta/src/Util.hs"]),(TargetModule Horta.Thresholds,["/Users/admin/GitLab/Horta/src/Horta/Thresholds.hs"]),(TargetModule Horta.Stream.App,["/Users/admin/GitLab/Horta/src/Horta/Stream/App.hs"]),(TargetModule Horta.Ingester.Dummy,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Dummy.hs"]),(TargetModule Horta.Stream.Whitelist,["/Users/admin/GitLab/Horta/src/Horta/Stream/Whitelist.hs"]),(TargetFile NormalizedFilePath "/Users/admin/GitLab/Horta/src/Main.hs",["/Users/admin/GitLab/Horta/src/Main.hs"]),(TargetModule Paths_horta,["/Users/admin/GitLab/Horta/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/horta/autogen/Paths_horta.hs"]),(TargetModule Vegoia.Http,["/Users/admin/GitLab/Horta/src/Vegoia/Http.hs"]),(TargetModule Color,["/Users/admin/GitLab/Horta/src/Color.hs"]),(TargetModule Vegoia.Modbus,["/Users/admin/GitLab/Horta/src/Vegoia/Modbus.hs"]),(TargetModule Horta.Config,["/Users/admin/GitLab/Horta/src/Horta/Config.hs"]),(TargetModule Codec.Serialise.Extras,["/Users/admin/GitLab/Horta/src/Codec/Serialise/Extras.hs"]),(TargetModule Horta.CmdLineOpt,["/Users/admin/GitLab/Horta/src/Horta/CmdLineOpt.hs"]),(TargetModule Horta.Ingester.Kafka,["/Users/admin/GitLab/Horta/src/Horta/Ingester/Kafka.hs"]),(TargetModule Horta.Stream.Modbus,["/Users/admin/GitLab/Horta/src/Horta/Stream/Modbus.hs"]),(TargetModule Horta.Network.Http.Connection,["/Users/admin/GitLab/Horta/src/Horta/Network/Http/Connection.hs"]),(TargetModule Horta.Stream.Const,["/Users/admin/GitLab/Horta/src/Horta/Stream/Const.hs"]),(TargetModule Horta.Stream.Anomaly,["/Users/admin/GitLab/Horta/src/Horta/Stream/Anomaly.hs"])]
2020-10-13 12:02:21.31966 [ThreadId 48] - Finishing build session(exception: AsyncCancelled)
2020-10-13 12:02:21.319781 [ThreadId 83] - Restarting build session (aborting the previous one took 0.00s)
2020-10-13 12:02:21.42185 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"4/83"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:21.624501 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"7/85"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:21.632294 [ThreadId 225] - finish: CodeAction (took 0.31s)
2020-10-13 12:02:21.632305 [ThreadId 224] - finish: C:GetParsedModule (took 0.31s)
2020-10-13 12:02:21.637974 [ThreadId 7] - <--2--{"result":[{"selectionRange":{"start":{"line":5,"character":7},"end":{"line":5,"character":11}},"kind":1,"children":[{"selectionRange":{"start":{"line":7,"character":0},"end":{"line":41,"character":19}},"kind":2,"children":[{"selectionRange":{"start":{"line":7,"character":0},"end":{"line":7,"character":27}},"kind":2,"name":"import Horta.Flow","range":{"start":{"line":7,"character":0},"end":{"line":7,"character":27}}},{"selectionRange":{"start":{"line":8,"character":0},"end":{"line":8,"character":39}},"kind":2,"name":"import Horta.Environment","range":{"start":{"line":8,"character":0},"end":{"line":8,"character":39}},"detail":"qualified"},{"selectionRange":{"start":{"line":9,"character":0},"end":{"line":9,"character":38}},"kind":2,"name":"import Horta.CmdLineOpt","range":{"start":{"line":9,"character":0},"end":{"line":9,"character":38}},"detail":"qualified"},{"selectionRange":{"start":{"line":10,"character":0},"end":{"line":10,"character":35}},"kind":2,"name":"import Horta.Options","range":{"start":{"line":10,"character":0},"end":{"line":10,"character":35}},"detail":"qualified"},{"selectionRange":{"start":{"line":11,"character":0},"end":{"line":11,"character":35}},"kind":2,"name":"import Horta.Config","range":{"start":{"line":11,"character":0},"end":{"line":11,"character":35}},"detail":"qualified"},{"selectionRange":{"start":{"line":12,"character":0},"end":{"line":12,"character":35}},"kind":2,"name":"import Horta.Logger","range":{"start":{"line":12,"character":0},"end":{"line":12,"character":35}},"detail":"qualified"},{"selectionRange":{"start":{"line":13,"character":0},"end":{"line":13,"character":41}},"kind":2,"name":"import Horta.WorkerConfig","range":{"start":{"line":13,"character":0},"end":{"line":13,"character":41}},"detail":"qualified"},{"selectionRange":{"start":{"line":14,"character":0},"end":{"line":14,"character":35}},"kind":2,"name":"import Horta.Queues","range":{"start":{"line":14,"character":0},"end":{"line":14,"character":35}},"detail":"qualified"},{"selectionRange":{"start":{"line":15,"character":0},"end":{"line":15,"character":35}},"kind":2,"name":"import Horta","range":{"start":{"line":15,"character":0},"end":{"line":15,"character":35}},"detail":"qualified"},{"selectionRange":{"start":{"line":16,"character":0},"end":{"line":16,"character":11}},"kind":2,"name":"import Util","range":{"start":{"line":16,"character":0},"end":{"line":16,"character":11}}},{"selectionRange":{"start":{"line":17,"character":0},"end":{"line":17,"character":13}},"kind":2,"name":"import Crypto","range":{"start":{"line":17,"character":0},"end":{"line":17,"character":13}}},{"selectionRange":{"start":{"line":19,"character":0},"end":{"line":19,"character":26}},"kind":2,"name":"import Options.Applicative","range":{"start":{"line":19,"character":0},"end":{"line":19,"character":26}}},{"selectionRange":{"start":{"line":20,"character":0},"end":{"line":20,"character":33}},"kind":2,"name":"import Data.Version","range":{"start":{"line":20,"character":0},"end":{"line":20,"character":33}}},{"selectionRange":{"start":{"line":21,"character":0},"end":{"line":21,"character":17}},"kind":2,"name":"import Data.Maybe","range":{"start":{"line":21,"character":0},"end":{"line":21,"character":17}}},{"selectionRange":{"start":{"line":22,"character":0},"end":{"line":22,"character":33}},"kind":2,"name":"import Data.Vector","range":{"start":{"line":22,"character":0},"end":{"line":22,"character":33}},"detail":"qualified"},{"selectionRange":{"start":{"line":24,"character":0},"end":{"line":24,"character":20}},"kind":2,"name":"import Control.Monad","range":{"start":{"line":24,"character":0},"end":{"line":24,"character":20}}},{"selectionRange":{"start":{"line":25,"character":0},"end":{"line":25,"character":25}},"kind":2,"name":"import Control.Concurrent","range":{"start":{"line":25,"character":0},"end":{"line":25,"character":25}}},{"selectionRange":{"start":{"line":27,"character":0},"end":{"line":27,"character":33}},"kind":2,"name":"import Control.Monad.Trans.Reader","range":{"start":{"line":27,"character":0},"end":{"line":27,"character":33}}},{"selectionRange":{"start":{"line":28,"character":0},"end":{"line":28,"character":29}},"kind":2,"name":"import Control.Monad.IO.Class","range":{"start":{"line":28,"character":0},"end":{"line":28,"character":29}}},{"selectionRange":{"start":{"line":29,"character":0},"end":{"line":29,"character":29}},"kind":2,"name":"import Control.Exception.Safe","range":{"start":{"line":29,"character":0},"end":{"line":29,"character":29}}},{"selectionRange":{"start":{"line":31,"character":0},"end":{"line":31,"character":31}},"kind":2,"name":"import Data.Yaml","range":{"start":{"line":31,"character":0},"end":{"line":31,"character":31}},"detail":"qualified"},{"selectionRange":{"start":{"line":32,"character":0},"end":{"line":32,"character":33}},"kind":2,"name":"import Paths_horta","range":{"start":{"line":32,"character":0},"end":{"line":32,"character":33}},"detail":"qualified"},{"selectionRange":{"start":{"line":34,"character":0},"end":{"line":34,"character":28}},"kind":2,"name":"import OpenSSL","range":{"start":{"line":34,"character":0},"end":{"line":34,"character":28}}},{"selectionRange":{"start":{"line":35,"character":0},"end":{"line":35,"character":27}},"kind":2,"name":"import System.Posix.Signals","range":{"start":{"line":35,"character":0},"end":{"line":35,"character":27}}},{"selectionRange":{"start":{"line":36,"character":0},"end":{"line":36,"character":29}},"kind":2,"name":"import System.Posix.Daemonize","range":{"start":{"line":36,"character":0},"end":{"line":36,"character":29}}},{"selectionRange":{"start":{"line":37,"character":0},"end":{"line":37,"character":28}},"kind":2,"name":"import System.FilePath.Posix","range":{"start":{"line":37,"character":0},"end":{"line":37,"character":28}}},{"selectionRange":{"start":{"line":38,"character":0},"end":{"line":38,"character":28}},"kind":2,"name":"import System.Log.FastLogger","range":{"start":{"line":38,"character":0},"end":{"line":38,"character":28}}},{"selectionRange":{"start":{"line":39,"character":0},"end":{"line":39,"character":39}},"kind":2,"name":"import System.Directory","range":{"start":{"line":39,"character":0},"end":{"line":39,"character":39}}},{"selectionRange":{"start":{"line":41,"character":0},"end":{"line":41,"character":19}},"kind":2,"name":"import Vegoia.Label","range":{"start":{"line":41,"character":0},"end":{"line":41,"character":19}}}],"name":"imports","range":{"start":{"line":7,"character":0},"end":{"line":41,"character":19}}},{"selectionRange":{"start":{"line":49,"character":0},"end":{"line":57,"character":60}},"kind":12,"name":"main","range":{"start":{"line":49,"character":0},"end":{"line":57,"character":60}}},{"selectionRange":{"start":{"line":60,"character":0},"end":{"line":91,"character":42}},"kind":12,"name":"mainRun","range":{"start":{"line":60,"character":0},"end":{"line":91,"character":42}}},{"selectionRange":{"start":{"line":95,"character":0},"end":{"line":96,"character":47}},"kind":12,"name":"createChannels","range":{"start":{"line":95,"character":0},"end":{"line":96,"character":47}}},{"selectionRange":{"start":{"line":100,"character":0},"end":{"line":138,"character":13}},"kind":12,"name":"runForever","range":{"start":{"line":100,"character":0},"end":{"line":138,"character":13}}}],"name":"Main","range":{"start":{"line":0,"character":0},"end":{"line":9223372036854775807,"character":0}}}],"jsonrpc":"2.0","id":1}
2020-10-13 12:02:21.826623 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"10/88"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:21.934164 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"30/99"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.036784 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"40/102"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.138033 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"69/120"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.243437 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"129/148"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.62077 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"130/148"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.725244 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"131/148"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.803045 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"uri":"file:///Users/admin/GitLab/Horta/src/Horta/Stream/App.hs","diagnostics":[{"severity":2,"range":{"start":{"line":137,"character":19},"end":{"line":137,"character":25}},"source":"typecheck","message":"Defined but not used: ‘mlware’","tags":[1]}]},"method":"textDocument/publishDiagnostics"}
2020-10-13 12:02:22.829544 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"137/151"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:22.930816 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"144/154"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:23.036686 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"report","message":"159/161"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:23.297014 [ThreadId 1834] - finish: kick (took 1.98s)
2020-10-13 12:02:23.296961 [ThreadId 1833] - finish: codeLens (took 1.98s)
2020-10-13 12:02:23.297118 [ThreadId 7] - <--2--{"jsonrpc":"2.0","params":{"value":{"kind":"end"},"token":"3"},"method":"$/progress"}
2020-10-13 12:02:23.297461 [ThreadId 1842] - finish:  (took 0.00s)
2020-10-13 12:02:23.298368 [ThreadId 7] - <--2--{"result":[{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":27}},"newText":"import Horta.Flow ( Flow )"}]}}],"title":"import Horta.Flow ( Flow )"},"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":27}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":16,"character":0},"end":{"line":16,"character":11}},"newText":"import Util ( foreverIf )"}]}}],"title":"import Util ( foreverIf )"},"range":{"start":{"line":16,"character":0},"end":{"line":16,"character":11}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":13}},"newText":"import Crypto ( getDecryptedContent )"}]}}],"title":"import Crypto ( getDecryptedContent )"},"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":13}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":19,"character":0},"end":{"line":19,"character":26}},"newText":"import Options.Applicative\n    ( fullDesc, header, info, execParser, helper )"}]}}],"title":"import Options.Applicative\n    ( fullDesc, header, info, execParser, helper )"},"range":{"start":{"line":19,"character":0},"end":{"line":19,"character":26}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":21,"character":0},"end":{"line":21,"character":17}},"newText":"import Data.Maybe ( fromMaybe )"}]}}],"title":"import Data.Maybe ( fromMaybe )"},"range":{"start":{"line":21,"character":0},"end":{"line":21,"character":17}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":24,"character":0},"end":{"line":24,"character":20}},"newText":"import Control.Monad ( void )"}]}}],"title":"import Control.Monad ( void )"},"range":{"start":{"line":24,"character":0},"end":{"line":24,"character":20}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":25,"character":0},"end":{"line":25,"character":25}},"newText":"import Control.Concurrent ( threadDelay )"}]}}],"title":"import Control.Concurrent ( threadDelay )"},"range":{"start":{"line":25,"character":0},"end":{"line":25,"character":25}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":27,"character":0},"end":{"line":27,"character":33}},"newText":"import Control.Monad.Trans.Reader ( ReaderT(runReaderT) )"}]}}],"title":"import Control.Monad.Trans.Reader ( ReaderT(runReaderT) )"},"range":{"start":{"line":27,"character":0},"end":{"line":27,"character":33}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":28,"character":0},"end":{"line":28,"character":29}},"newText":"import Control.Monad.IO.Class ( MonadIO(liftIO) )"}]}}],"title":"import Control.Monad.IO.Class ( MonadIO(liftIO) )"},"range":{"start":{"line":28,"character":0},"end":{"line":28,"character":29}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":29,"character":0},"end":{"line":29,"character":29}},"newText":"import Control.Exception.Safe ( catchAny )"}]}}],"title":"import Control.Exception.Safe ( catchAny )"},"range":{"start":{"line":29,"character":0},"end":{"line":29,"character":29}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":35,"character":0},"end":{"line":35,"character":27}},"newText":"import System.Posix.Signals\n    ( installHandler, sigHUP, Handler(Ignore) )"}]}}],"title":"import System.Posix.Signals\n    ( installHandler, sigHUP, Handler(Ignore) )"},"range":{"start":{"line":35,"character":0},"end":{"line":35,"character":27}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":36,"character":0},"end":{"line":36,"character":29}},"newText":"import System.Posix.Daemonize ( daemonize )"}]}}],"title":"import System.Posix.Daemonize ( daemonize )"},"range":{"start":{"line":36,"character":0},"end":{"line":36,"character":29}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":37,"character":0},"end":{"line":37,"character":28}},"newText":"import System.FilePath.Posix ( (</>) )"}]}}],"title":"import System.FilePath.Posix ( (</>) )"},"range":{"start":{"line":37,"character":0},"end":{"line":37,"character":28}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":38,"character":0},"end":{"line":38,"character":28}},"newText":"import System.Log.FastLogger\n    ( newTimedFastLogger,\n      newTimeCache,\n      simpleTimeFormat,\n      LogType'(LogStdout, LogFile),\n      FileLogSpec(FileLogSpec, log_file, log_file_size,\n                  log_backup_number) )"}]}}],"title":"import System.Log.FastLogger\n    ( newTimedFastLogger,\n      newTimeCache,\n      simpleTimeFormat,\n      LogType'(LogStdout, LogFile),\n      FileLogSpec(FileLogSpec, log_file, log_file_size,\n                  log_backup_number) )"},"range":{"start":{"line":38,"character":0},"end":{"line":38,"character":28}}},{"command":{"command":"1923:importLens:ImportLensCommand","arguments":[{"changes":{"file:///Users/admin/GitLab/Horta/src/Main.hs":[{"range":{"start":{"line":41,"character":0},"end":{"line":41,"character":19}},"newText":"import Vegoia.Label ( buildLabelDB, Namespace(..) )"}]}}],"title":"import Vegoia.Label ( buildLabelDB, Namespace(..) )"},"range":{"start":{"line":41,"character":0},"end":{"line":41,"character":19}}}],"jsonrpc":"2.0","id":3}
2020-10-13 12:02:23.300488 [ThreadId 1837] - finish: InitialLoad (took 1.97s)
2020-10-13 12:02:24.022093 [ThreadId 1846] - finish: CodeAction:PackageExports (took 2.39s)
2020-10-13 12:02:24.022442 [ThreadId 1847] - finish: importLens (took 0.00s)
2020-10-13 12:02:24.022609 [ThreadId 1849] - finish: retrie (took 0.00s)
2020-10-13 12:02:24.026674 [ThreadId 1855] - finish: tactic (took 0.00s)
2020-10-13 12:02:24.02691 [ThreadId 1860] - finish: tactic (took 0.00s)
2020-10-13 12:02:24.027059 [ThreadId 1861] - finish: tactic (took 0.00s)
2020-10-13 12:02:24.027202 [ThreadId 7] - <--2--{"result":[],"jsonrpc":"2.0","id":2}

Hope this info can be of help.
N.

WORKAROUND!

Not sure what's going on, but I found a workaround to the problem.

In vscode, the extension "Haskell for Visual Studio Code" starts working if and only if I open a module of the project located in the root directory (e.g. Main.hs or others). As I open one of them, I can see 'processing: 1/n, 2/n' etc. in the vscode bar and then everything is fine.

Instead, If I open vscode editing a submodule, nothing happens.

This information should be useful.

N.

@awgn could you double check that last issue was caused by using the Path_ module? For example removing its use in a failing project and checking it started to work with only that change.
The workaround doesn't seem to be related at a first glance with the use of that generated module.

The issue it is supposed to be fixed by the newer stack version and it is documented in the trubleshooting section so i am gonna close.o
@awgn feel free to reopen if it is still reproduced in you projects (after double checking that using Path_ module triggers it in isolation)

commented

I can confirm that stack 2.5.1 solved issues with Path_ in my project.

Hello,

Just to clarify. I'm using stack 2.5.1 which fixed definitively the Path_ issue.

However, the problem with the HLS (or the vscode plugin?) not processing files (and hence not working) until I open the Main.hs is still there.

I think it's better to open a new here on Github?

Best,
N.

@awgn yeah, i think i is better tracking it in a new one