@@ -722,21 +722,21 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir = do
722
722
hieYamlRule :: Rules ()
723
723
hieYamlRule = defineNoDiagnostics (cmapWithPrio LogShake recorder) $ \ HieYaml file ->
724
724
-- only one cradle consult at a time
725
- UnliftIO. withMVar cradleLock $ const $ do
725
+ UnliftIO. withMVar cradleLock $ const $ do
726
726
hieYaml <- use_ CradleLoc file
727
727
-- check the reason we are called
728
728
v <- Map. findWithDefault HM. empty hieYaml <$> (liftIO$ readVar fileToFlags)
729
+ case HM. lookup file v of
730
+ -- we already have the cache but it is still called, it must be deps changed
731
+ -- clear the cache and reconsult
732
+ -- we bump the version of the cache to inform others
733
+ Just _ -> do
734
+ liftIO clearCache
735
+ -- we don't have the cache, consult
736
+ Nothing -> pure ()
737
+ -- install cache version check to avoid recompilation
738
+ _ <- useNoFile_ SessionCacheVersion
729
739
catchError file hieYaml $ do
730
- case HM. lookup file v of
731
- -- we already have the cache but it is still called, it must be deps changed
732
- -- clear the cache and reconsult
733
- -- we bump the version of the cache to inform others
734
- Just _ -> do
735
- liftIO clearCache
736
- -- we don't have the cache, consult
737
- Nothing -> pure ()
738
- -- install cache version check to avoid recompilation
739
- _ <- useNoFile_ SessionCacheVersion
740
740
result@ (_, deps) <- consultCradle file
741
741
-- add the deps to the Shake graph
742
742
let addDependency fp = do
0 commit comments