Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

cabal-helper-wrapper is asking for "setup-config" #1130

Closed
mpardalos opened this issue Mar 12, 2019 · 5 comments
Closed

cabal-helper-wrapper is asking for "setup-config" #1130

mpardalos opened this issue Mar 12, 2019 · 5 comments
Labels
editor: emacs Emacs/Spacemacs-specific issues
Milestone

Comments

@mpardalos
Copy link

I'm using 9e5d9e1 with emacs-lsp. When starting lsp in my project I get the following error message:

cabal-helper-wrapper: /home/mpardalos/Documents/Kima/setup-config: openFile: does not exist (No such file or directory)

If I create that file with no contents then I get:

cabal-helper-wrapper: /home/mpardalos/Documents/Kima/setup-config: Data.ByteString.hGetLine: end of file

So I'm assuming this file has to contain something.

Am I missing something necessary or is this due to HIE?

@mpickering
Copy link
Collaborator

@mpardalos The setup-config file is something produced by Cabal. What is the structure of your project?

@mpardalos
Copy link
Author

mpardalos commented Mar 12, 2019

I'm using stack, so I don't know how that affects everything, but here's the layout
image

Here's the repo to see the stack and cabal files if necessary https://github.com/mpardalos/Kima/tree/3ac9c0bd4fb3d0c5e4be54147e6255e3677018c0

@Anrock Anrock added the editor: emacs Emacs/Spacemacs-specific issues label Mar 12, 2019
@mpardalos
Copy link
Author

Adding some more information that might help.
HIE log here: https://gist.github.com/mpardalos/9a506e903268197b72788a7139b5e418).

HIE errors out when running this command

/home/mpardalos/.local/bin/cabal-helper-wrapper --with-ghc=/home/mpardalos/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.3/bin/ghc --with-ghc-pkg=/home/mpardalos/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.3/bin/ghc-pkg --with-cabal=cabal v1-style /home/mpardalos/Documents/Kima /home/mpardalos/Documents/Kima/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 package-db-stack flags compiler-version ghc-merged-pkg-options config-flags non-default-config-flags ghc-src-options ghc-pkg-options ghc-lang-options ghc-options source-dirs entrypoints needs-build-output

which looks for a setup-config in the root directory of the project

If I symlink that to the only setup-config file in the project:

ln -s .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/setup-config setup-config

I get

cabal-helper0.8.1.0-Cabal2.4.0.1: v1-style: getDirectoryContents:openDirStream: does not exist (No such file or directory)

Possibly this is something to do with cabal v1 and v2?

This issue is a complete blocker for me :/ I'm relying on ghcid for now.

@mpardalos
Copy link
Author

Deleting ~/.stack, ~/.cabal and rebuilding solved the issue in the end. I'm assuming it was caused by an old cabal-helper. Closing the issue

@alanz alanz added this to the 2019-03 milestone Apr 6, 2019
@mikelpr
Copy link

mikelpr commented Oct 3, 2019

if you end up here from google you're actually looking for #1376

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor: emacs Emacs/Spacemacs-specific issues
Projects
None yet
Development

No branches or pull requests

5 participants