Ghcide: Program error: Failed to load interface for ‘Data.DList’ There are files missing in the ‘dlist-0.8.0.7’ package,

Created on 15 Nov 2019  Â·  13Comments  Â·  Source: haskell/ghcide

when I import System.File.Glob ghcide is throwing following error on vscode

Program error: Failed to load interface for ‘Data.DList’
There are files missing in the ‘dlist-0.8.0.7’ package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.typeche

and following on terminal

Step 6/6: Type checking the files
File:     ./src/File/FileStream.hs
Range:    1:0-100001:0
Source:   typecheck
Severity: DsError
Message: 
  Program error: Failed to load interface for ‘Data.DList’
Files that failed:
  There are files missing in the ‘dlist-0.8.0.7’ package,
 * ./src/File/FileStream.hs
  try running 'ghc-pkg check'.
  Use -v to see a list of the files searched for.

Completed (2 files worked, 1 file failed)

I'm using cabal+nix

Most helpful comment

Can you try the cabal cradle?

All 13 comments

Are you running ghcide from a nix shell? If so, maybe take a look at https://github.com/digital-asset/ghcide/blob/master/docs/Setup.md#issues-with-nix

Yes I'm running ghcide from nix shell. For vscode I'm using direnv to make ghcide work

It was woking with same dependencies on the other repo. I latter moved to new project and borrowed the dependencies. Since then I'm facing this issue. At first I thought there was some problem with nix, but after debugging I found out that the problem origins form ghcide when I import Glob

Could it be that you are using a different GHC version?

I built ghcide with the same version of ghc that I'm using in my project

And you looked at the libdir fixes that I linked to above?

Oh which cradle are you using? And have you installed all deps via nix or did you get some from cabal-install?

I have installed all dependencies using nix

default cradle

Step 3/6, Cradle 1/1: Implicit cradle for /home/shivam/Documents/transporter
Cradle {cradleRootDir = "/home/shivam/Documents/transporter", cradleOptsProg = CradleAction: default}

Can you try the cabal cradle?

Can you please give one example of cabal cradle

using cabal cradle worked. I just had to add

cradle: {cabal: {component: "project-name"}}

in hie.yaml file in projects root dir

@cocreature Thanks for helping

@shivamashtikar Great! I’ve documented the solution to this issue in https://github.com/digital-asset/ghcide/pull/195

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomjaguarpaw picture tomjaguarpaw  Â·  4Comments

googleson78 picture googleson78  Â·  9Comments

bubba picture bubba  Â·  4Comments

fendor picture fendor  Â·  7Comments

domenkozar picture domenkozar  Â·  3Comments