Skip to content

Commit 7d1649e

Browse files
committed
Remove configCabalFileModTime
No longer fits in nicely with the split between installed and local caches
1 parent ca17d17 commit 7d1649e

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

src/Stack/Build/Cache.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ writeFlagCache gid flags deps = do
177177
let cache = ConfigCache
178178
{ configCacheOpts = flags
179179
, configCacheDeps = deps
180-
, configCabalFileModTime = Nothing -- FIXME I'm not convinced this should even be in ConfigCache
181180
}
182181
liftIO $ do
183182
createDirectoryIfMissing True $ toFilePath $ parent file

src/Stack/Build/ConstructPlan.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ checkDirtiness ps (Library installed) package present = do
326326
configCache = ConfigCache
327327
{ configCacheOpts = map encodeUtf8 configOpts
328328
, configCacheDeps = present
329-
, configCabalFileModTime = Nothing
330329
}
331330
moldOpts <- tryGetFlagCache installed
332331
case moldOpts of

src/Stack/Build/Execute.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ singleBuild ActionContext {..} ExecuteEnv {..} task@Task {..} =
292292
-- Determine the old and new configuration in the local directory, to
293293
-- determine if we need to reconfigure.
294294
mOldConfigCache <- tryGetConfigCache pkgDir
295+
-- FIXME check if the .cabal file has changed
296+
-- mOldCabalMod <- tryGetCabalMod pkgDir
297+
-- now <- liftIO (getModificationTime (toFilePath cabalfp))
295298

296299
idMap <- liftIO $ readTVarIO eeGhcPkgIds
297-
now <- liftIO (getModificationTime (toFilePath cabalfp))
298300
let getMissing ident =
299301
case Map.lookup ident idMap of
300302
Nothing -> error "singleBuild: invariant violated, missing package ID missing"
@@ -307,7 +309,6 @@ singleBuild ActionContext {..} ExecuteEnv {..} task@Task {..} =
307309
newConfigCache = ConfigCache
308310
{ configCacheOpts = map encodeUtf8 configOpts
309311
, configCacheDeps = allDeps
310-
, configCabalFileModTime = Just $ modTime now
311312
}
312313

313314
when (mOldConfigCache /= Just newConfigCache) $ withMVar eeConfigureLock $ \_ -> do

src/Stack/Build/Types.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ data ConfigCache = ConfigCache
315315
-- the complete GhcPkgId (only a PackageIdentifier) in the configure
316316
-- options, just using the previous value is insufficient to know if
317317
-- dependencies have changed.
318-
, configCabalFileModTime :: !(Maybe ModTime)
319-
-- ^ Last time the .cabal file was changed.
320318
}
321319
deriving (Generic,Eq,Show)
322320
instance Binary ConfigCache

0 commit comments

Comments
 (0)