Commit 4104a615 authored by Simon Marlow's avatar Simon Marlow
Browse files

hscParse: do not record a dependency on non-existent source files

parent 3f34e091
...@@ -149,6 +149,7 @@ import Control.Monad ...@@ -149,6 +149,7 @@ import Control.Monad
import Data.Maybe import Data.Maybe
import Data.IORef import Data.IORef
import System.FilePath as FilePath import System.FilePath as FilePath
import System.Directory
#include "HsVersions.h" #include "HsVersions.h"
...@@ -365,9 +366,14 @@ hscParse' mod_summary = do ...@@ -365,9 +366,14 @@ hscParse' mod_summary = do
Just f -> filter (/= FilePath.normalise f) srcs0 Just f -> filter (/= FilePath.normalise f) srcs0
Nothing -> srcs0 Nothing -> srcs0
-- sometimes we see source files from earlier
-- preprocessing stages that cannot be found, so just
-- filter them out:
srcs2 <- liftIO $ filterM doesFileExist srcs1
return HsParsedModule { return HsParsedModule {
hpm_module = rdr_module, hpm_module = rdr_module,
hpm_src_files = srcs1 hpm_src_files = srcs2
} }
-- XXX: should this really be a Maybe X? Check under which circumstances this -- XXX: should this really be a Maybe X? Check under which circumstances this
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment