Open pakanek opened 8 years ago
I think it makes sense to standardize have one "directory not found" exception, and share it everywhere.
There is a NoSuchDirectory
constructor in Stack.Types.Config.ConfigException
, but Stack.Config
is not the only module that calls resolveDir
/resolveDir'
:
src/Stack/Config.hs:316: Nothing -> resolveDir' userPath
src/Stack/Config.hs:318: Just (_, configYaml) -> resolveDir (parent configYaml) userPath)
src/Stack/Config.hs:538: extraPackageDBs <- mapM resolveDir' (projectExtraPackageDBs project)
src/Stack/Config.hs:566: subs -> mapM (resolveDir entryRoot) subs
src/Stack/Config.hs:597:resolvePackageLocation _ projRoot (PLFilePath fp) = resolveDir projRoot fp
src/Stack/Coverage.hs:279: dest <- resolveDir' destDir
src/Stack/Fetch.hs:151: dest' <- resolveDir' dest
src/Stack/GhcPkg.hs:60: resolveDir' fp
src/Stack/Image.hs:113: do sourcePath <- resolveDir (bcRoot bconfig) source
src/Stack/Init.hs:75: dirs <- mapM (resolveDir' . T.unpack) (searchDirs initOpts)
src/main/Main.hs:688: pkgDir <- resolveDir' dir
src/main/Main.hs:707: else mapM resolveDir' dirs
Steps to reproduce Add invalid value to
extra-package-dbs
eg.Expected
Actual
ghc-datasize
belongs toextra-deps
(my mistake). Error message does not tell you that stack is looking for database instead of package.