hsdev
hsdev copied to clipboard
hsdev says "After installing Cabal, the package id couldn't be found"
I'm using hsdev through SublimeHaskell, and hsdev
says this kind of error. (Full log with SublimeHaskell: https://pastebin.com/uXUrSTTT)
<hsdev stderr> 2018-01-15 10:51:57 +0900 ERROR :127.0.0.1:58905/update/task/project> Scope leaves with exception: tool '/usr/local/bin/stack' failed: exited with code 1: After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug
<hsdev stderr>
<hsdev stderr> CallStack (from HasCallStack):
<hsdev stderr> onError, called at src/System/Log/Simple/Monad.hs:104:36 in simple-log-0.9.3-LoOHmA7NyTW5wR9y7FxDp:System.Log.Simple.Monad
<hsdev stderr>
<hsdev stderr> 2018-01-15 10:51:57 +0900 ERROR :127.0.0.1:58905/update/task> Scope leaves with exception: tool '/usr/local/bin/stack' failed: exited with code 1: After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug
<hsdev stderr>
<hsdev stderr> CallStack (from HasCallStack):
<hsdev stderr> onError, called at src/System/Log/Simple/Monad.hs:104:36 in simple-log-0.9.3-LoOHmA7NyTW5wR9y7FxDp:System.Log.Simple.Monad
<hsdev stderr>
<hsdev stderr> 2018-01-15 10:51:57 +0900 ERROR :127.0.0.1:58905/update/task> Scope leaves with exception: tool '/usr/local/bin/stack' failed: exited with code 1: After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug
<hsdev stderr>
...
(repeated almostly same error message)
...
<hsdev stderr>
<hsdev stderr> 2018-01-15 10:51:59 +0900 ERROR :127.0.0.1:58905/update> tool '/usr/local/bin/stack' failed: exited with code 1: After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug
<hsdev stderr>
Sublime Haskell: complete returns error: tool error
msg: exited with code 1: After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug
, id: 3, tool: /usr/local/bin/stack
I usually do not using stack.
Even I run stack update
, I still got same error.
To solve this problem, I tried removing ~/.ghc
and install hsdev
cleanly.
But I still got this error again.
I could get Cabal information by running ghc-pkg describe Cabal
like:
name: Cabal
version: 2.0.1.1
id: Cabal-2.0.1.1-99tbaCBn5in8ykZQ2Yxqis
key: Cabal-2.0.1.1-99tbaCBn5in8ykZQ2Yxqis
license: BSD3
copyright: 2003-2017, Cabal Development Team (see AUTHORS file)
maintainer: [email protected]
homepage: http://www.haskell.org/cabal/
synopsis: A framework for packaging Haskell software
description:
The Haskell Common Architecture for Building Applications and
.....
category: Distribution
author: Cabal Development Team <[email protected]>
exposed: True
indefinite: False
exposed-modules:
Distribution.Backpack Distribution.Backpack.ComponentsGraph
.....
Distribution.Version Language.Haskell.Extension
hidden-modules: Distribution.Backpack.PreExistingComponent
Distribution.Backpack.ReadyComponent Distribution.Backpack.MixLink
.....
Distribution.Simple.GHC.IPIConvert Distribution.Simple.GHC.ImplInfo
Paths_Cabal
abi: 5bc64e126f8a48defc927a001ef3f014
trusted: False
import-dirs: /Users/yongjoon/Library/Haskell/ghc-8.2.2-x86_64/lib/Cabal-2.0.1.1
library-dirs: /Users/yongjoon/Library/Haskell/ghc-8.2.2-x86_64/lib/Cabal-2.0.1.1
dynamic-library-dirs: /Users/yongjoon/Library/Haskell/ghc-8.2.2-x86_64/lib/x86_64-osx-ghc-8.2.2
data-dir: /Users/yongjoon/Library/Haskell/share/ghc-8.2.2-x86_64/Cabal-2.0.1.1
hs-libraries: HSCabal-2.0.1.1-99tbaCBn5in8ykZQ2Yxqis
depends:
array-0.5.2.0 base-4.10.1.0 bytestring-0.10.8.2 containers-0.5.10.2
deepseq-1.4.3.0 filepath-1.4.1.2 pretty-1.1.3.3 process-1.6.1.0
time-1.8.0.2 directory-1.3.0.2 binary-0.8.5.1 unix-2.7.2.2
abi-depends: array-0.5.2.0=d7fc51366d56ae3c8ffbfbecc21590f7
base-4.10.1.0=046c8a76d096a59d136f437126cc8591
...
unix-2.7.2.2=8e8b8e7a9fcf688929b1ab08953961be
haddock-interfaces: /Users/yongjoon/Library/Haskell/ghc-8.2.2-x86_64/lib/Cabal-2.0.1.1/doc/html/Cabal.haddock
haddock-html: /Users/yongjoon/Library/Haskell/ghc-8.2.2-x86_64/lib/Cabal-2.0.1.1/doc/html
pkgroot: "/Users/yongjoon/.ghc/x86_64-darwin-8.2.2"
Here is my environment: GHC: 8.2.2 OS: macOS 10.13.2
Does hsdev
have compatibility problem with Cabal-2.*
?
I'm using hsdev with Cabal-2.0.0.2
Is your hsdev built with Cabal-2.*
?
Unfortunately, hsdev now can't be asked to use cabal
or stack
, it selects tool depending on existance .cabal-sandbox
, stack.yaml
/.stack-work
As workaround, you can rename stack.yaml
.