@@ -64,10 +64,11 @@ computeAndStoreCausalDiff authZReceipt old@(oldCodebase, _, oldCausalId) new@(ne
6464 Right diff -> NamespaceDiffs. NamespaceDiffResult'Ok diff
6565 Left err -> NamespaceDiffs. NamespaceDiffResult'Err err
6666 let encoded = Aeson. encode result
67- ContributionQ. savePrecomputedNamespaceDiff
68- (oldCodebase, oldCausalId)
69- (newCodebase, newCausalId)
70- (TL. toStrict $ TL. decodeUtf8 encoded)
67+ PG. transactionSpan " savePrecomputedNamespaceDiff" mempty do
68+ ContributionQ. savePrecomputedNamespaceDiff
69+ (oldCodebase, oldCausalId)
70+ (newCodebase, newCausalId)
71+ (TL. toStrict $ TL. decodeUtf8 encoded)
7172 pure (PreEncoded encoded)
7273
7374tryComputeCausalDiff ::
@@ -188,7 +189,8 @@ tryComputeCausalDiff !_authZReceipt (oldCodebase, oldRuntime, oldCausalId) (newC
188189 -- relative to, unless there isn't an LCA (unlikely), in which case we fall back on the other branch (we won't have
189190 -- anything classified as an "update" in this case so it doesn't really matter).
190191
191- let defns3 =
192+ let defns3 :: GNamespaceTreeDiff NameSegment (TermTag , ShortHash ) (TypeTag , ShortHash ) TermDefinition TypeDefinition TermDefinitionDiff TypeDefinitionDiff
193+ defns3 =
192194 defns2
193195 & NamespaceDiffs. namespaceTreeDiffTermDiffs_ %~ (\ name -> (oldTermDefinitionsByName Map. ! name, newTermDefinitionsByName Map. ! name))
194196 & NamespaceDiffs. witherNamespaceTreeDiffTermDiffs (Identity . diffTermsPure)
0 commit comments