Closed ilyakooo0 closed 5 years ago
It seems that there's no .cabal
file in the package directory (projdir
).
isCabalFile
function from cabal-helper
:
isCabalFile :: FilePath -> Bool
isCabalFile f = takeExtension' f == ".cabal"
takeExtension' :: FilePath -> String
takeExtension' p =
if takeFileName p == takeExtension p
then "" -- just ".cabal" is not a valid cabal file
else takeExtension p
cabal-helper
needs .cabal
file to get package description.
Is there a package.yaml
(https://github.com/sol/hpack) file in the package directory? hpack
can generate .cabal
file from package.yaml
.
Yeah, this was related to me not specifying the full dist
path. I essentially left it at .stack-work/dist
. There should be a more descriptive error for this though.
I agree that the error message should be more descriptive. I've added the check for .cabal
file (6c6d96288f41b7c44657e265dc98e519505e357c)
I think the issue is fixed.
I get this error when trying to index one of the packages in a project.
After adding a trace to the line:
I get
[]
.