More sensitive to cache invalidation.
This addresses a problem where changes to a .cabal file were not invalidating the cache files.
This commit is contained in:
parent
3bf4243baf
commit
e06e4d25df
@ -199,8 +199,9 @@ resolvedComponentsCache = Cached {
|
|||||||
cacheFile = resolvedComponentsCacheFile,
|
cacheFile = resolvedComponentsCacheFile,
|
||||||
cachedAction = \tcfs comps ma -> do
|
cachedAction = \tcfs comps ma -> do
|
||||||
Cradle {..} <- cradle
|
Cradle {..} <- cradle
|
||||||
let mums =
|
let iifsM = invalidatingInputFiles tcfs
|
||||||
case invalidatingInputFiles tcfs of
|
mums =
|
||||||
|
case iifsM of
|
||||||
Nothing -> Nothing
|
Nothing -> Nothing
|
||||||
Just iifs ->
|
Just iifs ->
|
||||||
let
|
let
|
||||||
@ -210,10 +211,12 @@ resolvedComponentsCache = Cached {
|
|||||||
in if null changedFiles
|
in if null changedFiles
|
||||||
then Nothing
|
then Nothing
|
||||||
else Just $ map Left changedFiles
|
else Just $ map Left changedFiles
|
||||||
|
setupChanged = maybe False
|
||||||
case ma of
|
(elem $ cradleRootDir </> setupConfigPath)
|
||||||
Just mcs -> gmsGet >>= \s -> gmsPut s { gmComponents = mcs }
|
iifsM
|
||||||
Nothing -> return ()
|
case (setupChanged, ma) of
|
||||||
|
(False, Just mcs) -> gmsGet >>= \s -> gmsPut s { gmComponents = mcs }
|
||||||
|
_ -> return ()
|
||||||
|
|
||||||
-- liftIO $ print ("changed files", mums :: Maybe [Either FilePath ()])
|
-- liftIO $ print ("changed files", mums :: Maybe [Either FilePath ()])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user