@@ -67,6 +67,7 @@ import qualified Stuff
6767data Details =
6868 Details
6969 { _outlineTime :: File.Time
70+ , _forkHash :: Word64
7071 , _outline :: ValidOutline
7172 , _buildID :: BuildID
7273 , _locals :: Map.Map ModuleName.Raw Local
@@ -125,14 +126,14 @@ type Interfaces =
125126
126127
127128loadObjects :: FilePath -> Details -> IO (MVar (Maybe Opt.GlobalGraph))
128−loadObjects root (Details _ _ _ _ _ extras) =
129+loadObjects root (Details _ _ _ _ _ _ extras) =
129130 case extras of
130131 ArtifactsFresh _ o -> newMVar (Just o)
131132 ArtifactsCached -> fork (File.readBinary (Stuff.objects root))
132133
133134
134135loadInterfaces :: FilePath -> Details -> IO (MVar (Maybe Interfaces))
135−loadInterfaces root (Details _ _ _ _ _ extras) =
136+loadInterfaces root (Details _ _ _ _ _ _ extras) =
136137 case extras of
137138 ArtifactsFresh i _ -> newMVar (Just i)
138139 ArtifactsCached -> fork (File.readBinary (Stuff.interfaces root))
@@ -164,8 +165,8 @@ load style scope root =
164165 Nothing ->
165166 generate style scope root newTime
166167
167− Just details@(Details oldTime _ buildID _ _ _) ->
168− if oldTime == newTime
168+ Just details@(Details oldTime oldHash _ buildID _ _ _) ->
169+ if oldTime == newTime && oldHash == Lynx.forkContentHash
169170 then return (Right details { _buildID = buildID + 1 })
170171 else generate style scope root newTime
171172
@@ -331,7 +332,7 @@ verifyDependencies env@(Env key scope root cache _ _ _) time outline solution di
331332 objs = Map.foldr addObjects Opt.empty artifacts
332333 ifaces = Map.foldrWithKey (addInterfaces directDeps) Map.empty artifacts
333334 foreigns = Map.map (OneOrMore.destruct Foreign) $ Map.foldrWithKey gatherForeigns Map.empty $ Map.intersection artifacts directDeps
334− details = Details time outline 0 Map.empty foreigns (ArtifactsFresh ifaces objs)
335+ details = Details time Lynx.forkContentHash outline 0 Map.empty foreigns (ArtifactsFresh ifaces objs)
335336 in
336337 do BW.writeBinary scope (Stuff.objects root) objs
337338 BW.writeBinary scope (Stuff.interfaces root) ifaces
@@ -789,14 +790,15 @@ endpointDecoder =
789790
790791
791792instance Binary Details where
792− put (Details a b c d e _) = put a >> put b >> put c >> put d >> put e
793+ put (Details a b c d e f _) = put a >> put b >> put c >> put d >> put e >> put f
793794 get =
794795 do a <- get
795796 b <- get
796797 c <- get
797798 d <- get
798799 e <- get
799− return (Details a b c d e ArtifactsCached)
800+ f <- get
801+ return (Details a b c d e f ArtifactsCached)
800802
801803
802804instance Binary ValidOutline where