git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix #1174, check foreign files for staleness
3a1df02Phil Freeman
psc-make/Make.hs+3−1
@@ -74,7 +74,9 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
74 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
74 getInputTimestamp :: P.ModuleName -> Make (Either P.RebuildPolicy (Maybe UTCTime))
75 getInputTimestamp mn = do
75 getInputTimestamp mn = do
76 let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
76 let path = fromMaybe (error "Module has no filename in 'make'") $ M.lookup mn filePathMap
77− traverseEither getTimestamp path
77+ e1 <- traverseEither getTimestamp path
78+ fPath <- maybe (return Nothing) (getTimestamp . fst) $ M.lookup mn foreigns
79+ return $ fmap (max fPath) e1
78
80
79 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
81 getOutputTimestamp :: P.ModuleName -> Make (Maybe UTCTime)
80 getOutputTimestamp mn = do
82 getOutputTimestamp mn = do