Extract to variable

This commit is contained in:
Jeroen Engels 2023-04-08 09:41:58 +02:00
parent d8b35ef8fc
commit 1ed98dd95a

View File

@ -5553,9 +5553,13 @@ createFinalProjectEvaluationVisitor schema { exceptions } raise cache =
inputContext = inputContext =
computeFinalContext schema cache computeFinalContext schema cache
inputContextHashes : ContextHash projectContext
inputContextHashes =
ContextHash.create inputContext
cachePredicate : FinalProjectEvaluationCache projectContext -> Bool cachePredicate : FinalProjectEvaluationCache projectContext -> Bool
cachePredicate entry = cachePredicate entry =
Cache.matchNoOutput (ContextHash.create inputContext) entry Cache.matchNoOutput inputContextHashes entry
in in
case reuseProjectRuleCache cachePredicate .finalEvaluationErrors cache of case reuseProjectRuleCache cachePredicate .finalEvaluationErrors cache of
Just entry -> Just entry ->
@ -5568,7 +5572,7 @@ createFinalProjectEvaluationVisitor schema { exceptions } raise cache =
filterExceptionsAndSetName exceptions schema.name (finalEvaluationFn inputContext) filterExceptionsAndSetName exceptions schema.name (finalEvaluationFn inputContext)
in in
( errors ( errors
, raise { cache | finalEvaluationErrors = Just (Cache.createNoOutput (ContextHash.create inputContext) errors) } , raise { cache | finalEvaluationErrors = Just (Cache.createNoOutput inputContextHashes errors) }
) )
) )