@@ -67,6 +67,7 @@ import qualified Stuff
67data Details =
67data Details =
69 { _outlineTime :: File.Time
69 { _outlineTime :: File.Time
70+ , _forkHash :: Word64
70 , _outline :: ValidOutline
71 , _outline :: ValidOutline
71 , _buildID :: BuildID
72 , _buildID :: BuildID
72 , _locals :: Map.Map ModuleName.Raw Local
73 , _locals :: Map.Map ModuleName.Raw Local
@@ -125,14 +126,14 @@ type Interfaces =
127loadObjects :: FilePath -> Details -> IO (MVar (Maybe Opt.GlobalGraph))
128loadObjects :: FilePath -> Details -> IO (MVar (Maybe Opt.GlobalGraph))
128−loadObjects root (Details _ _ _ _ _ extras) =
129+loadObjects root (Details _ _ _ _ _ _ extras) =
129 case extras of
130 case extras of
130 ArtifactsFresh _ o -> newMVar (Just o)
131 ArtifactsFresh _ o -> newMVar (Just o)
131 ArtifactsCached -> fork (File.readBinary (Stuff.objects root))
132 ArtifactsCached -> fork (File.readBinary (Stuff.objects root))
134loadInterfaces :: FilePath -> Details -> IO (MVar (Maybe Interfaces))
135loadInterfaces :: FilePath -> Details -> IO (MVar (Maybe Interfaces))
135−loadInterfaces root (Details _ _ _ _ _ extras) =
136+loadInterfaces root (Details _ _ _ _ _ _ extras) =
136 case extras of
137 case extras of
137 ArtifactsFresh i _ -> newMVar (Just i)
138 ArtifactsFresh i _ -> newMVar (Just i)
138 ArtifactsCached -> fork (File.readBinary (Stuff.interfaces root))
139 ArtifactsCached -> fork (File.readBinary (Stuff.interfaces root))
@@ -164,8 +165,8 @@ load style scope root =
164 Nothing ->
165 Nothing ->
165 generate style scope root newTime
166 generate style scope root newTime
167− Just details@(Details oldTime _ buildID _ _ _) ->
168+ Just details@(Details oldTime oldHash _ buildID _ _ _) ->
168− if oldTime == newTime
169+ if oldTime == newTime && oldHash == Lynx.forkContentHash
169 then return (Right details { _buildID = buildID + 1 })
170 then return (Right details { _buildID = buildID + 1 })
170 else generate style scope root newTime
171 else generate style scope root newTime
@@ -331,7 +332,7 @@ verifyDependencies env@(Env key scope root cache _ _ _) time outline solution di
331 objs = Map.foldr addObjects Opt.empty artifacts
332 objs = Map.foldr addObjects Opt.empty artifacts
332 ifaces = Map.foldrWithKey (addInterfaces directDeps) Map.empty artifacts
333 ifaces = Map.foldrWithKey (addInterfaces directDeps) Map.empty artifacts
333 foreigns = Map.map (OneOrMore.destruct Foreign) $ Map.foldrWithKey gatherForeigns Map.empty $ Map.intersection artifacts directDeps
334 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)
336 do BW.writeBinary scope (Stuff.objects root) objs
337 do BW.writeBinary scope (Stuff.objects root) objs
337 BW.writeBinary scope (Stuff.interfaces root) ifaces
338 BW.writeBinary scope (Stuff.interfaces root) ifaces
@@ -789,14 +790,15 @@ endpointDecoder =
791instance Binary Details where
792instance 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
794 do a <- get
795 do a <- get
799− return (Details a b c d e ArtifactsCached)
801+ return (Details a b c d e f ArtifactsCached)
802instance Binary ValidOutline where
804instance Binary ValidOutline where