I'm trying to get Haskell Language Server working in vscode...it works for built-in packages (like containers) but fails for others (like aeson). I've also tried this from atom and it failed with the same output. From the vscode extension logs:
info: Using Cabal project at: /Users/christian.henry/coding/haskell/nix-test
DEBUG: reading cache: /Users/christian.henry/coding/haskell/nix-test/dist/setup-config.ghc-mod.cabal-components
DEBUG: resolveEntrypoint:
["-i","-idist/build/nix-test/nix-test-tmp","-isrc","-idist/build/nix-test/autogen","-idist/build/global-autogen","-Idist/build/nix-test/autogen","-Idist/build/global-autogen","-Idist/build/nix-test/nix-test-tmp","-optP-include","-optPdist/build/nix-test/autogen/cabal_macros.h"]
DEBUG: resolveEntrypoint: []
DEBUG: making sure autogen files exist
DEBUG: autogen files out of sync
DEBUG: writing Cabal autogen files
DEBUG: reading cache: dist/setup-config.ghc-mod.resolved-components
VOMIT: Using the following mapped files: "/Users/christian.henry/coding/haskell/nix-test/src/Main.hs"
VOMIT: Initializing GHC session with following options: "-fbuilding-cabal-package" "-O" "-outputdir" "dist/build/nix-test/nix-test-tmp" "-odir" "dist/build/nix-test/nix-test-tmp" "-hidir" "dist/build/nix-test/nix-test-tmp" "-stubdir" "dist/build/nix-test/nix-test-tmp" "-i" "-idist/build/nix-test/nix-test-tmp" "-isrc" "-idist/build/nix-test/autogen" "-idist/build/global-autogen" "-Idist/build/nix-test/autogen" "-Idist/build/global-autogen" "-Idist/build/nix-test/nix-test-tmp" "-optP-include" "-optPdist/build/nix-test/autogen/cabal_macros.h" "-hide-all-packages" "-Wmissing-home-modules" "-package-id" "base-4.11.1.0" "-package-id" "aeson-1.3.1.1-IIws8ihD9EF7nr6Y0MCLpZ" "-package-id" "containers-0.5.11.0" "-package-id" "lens-4.16.1-3z2CFiAMwL0tenn7vLScQ" "-package-id" "text-1.2.3.0" "-XHaskell2010" "-Wno-missing-home-modules" "-O0" "-fno-warn-missing-home-modules"
DEBUG: initSession: Session not initialized, creating new one
[Error - 7:02:47 PM] Request textDocument/documentSymbol failed.
Message: <command line>: cannot satisfy -package-id aeson-1.3.1.1-IIws8ihD9EF7nr6Y0MCLpZ
(use -v for more information)
Code: -32700
Note that I'm using Nix, but launched vscode from a nix shell that should have access to everything it needs. Things I've tested from this shell:
I can run hie:
$ hie
2018-09-17 20:38:35.095262 [ThreadId 4] - Using plain GHC version
2018-09-17 20:38:35.17374 [ThreadId 4] - Run entered for HIE(hie) Version 0.2.0.0, Git revision 75e1aca6060840f3c3e011f8afbf3dc18f1fb710 (1522 commits) x86_64 ghc-8.4.3
2018-09-17 20:38:35.175159 [ThreadId 4] - Current directory:/Users/christian.henry/coding/haskell/nix-test
$ cabal update
Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
cabal update --index-state='2018-09-17T22:51:40Z'
Anyone have ideas as to what I can try to fix this?
I'm trying to get Haskell Language Server working in vscode...it works for built-in packages (like containers) but fails for others (like aeson). I've also tried this from atom and it failed with the same output. From the vscode extension logs:
Note that I'm using Nix, but launched vscode from a nix shell that should have access to everything it needs. Things I've tested from this shell:
Anyone have ideas as to what I can try to fix this?