From: Matt S Trout Date: Sun, 10 Jul 2016 00:26:25 +0000 (+0000) Subject: recheck one at a time X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=49e9aea047c8bf571c65cc22f73d7fecdcfe7d5e;p=scpubgit%2FDX.git recheck one at a time --- diff --git a/lib/DX/Step/ResolveProposition.pm b/lib/DX/Step/ResolveProposition.pm index 09064c7..e18a47e 100644 --- a/lib/DX/Step/ResolveProposition.pm +++ b/lib/DX/Step/ResolveProposition.pm @@ -66,6 +66,15 @@ sub _recheck_hyp_for { my ($self, $old_hyp, @recheck) = @_; return undef unless $old_hyp; return $old_hyp unless @recheck; + my $hyp = $old_hyp; + foreach my $prop (@recheck) { + return undef unless $hyp = $self->_recheck_one($hyp, $prop); + } + return $hyp; +} + +sub _recheck_one { + my ($self, $old_hyp, $prop) = @_; my $ap = DX::ActionPolicy::LockScope->new( lock_to_depth => $old_hyp->scope->depth, @@ -84,7 +93,7 @@ sub _recheck_hyp_for { ); my $pseq = DX::PropositionSequence->new( - members => \@recheck, + members => [ $prop ], external_names => {}, internal_names => {}, ); @@ -105,8 +114,8 @@ sub _recheck_hyp_for { my $rps = $old_hyp->resolved_propositions; $rps = $rps->with_updated_dependencies_for( - $_, $sol_rps->dependencies_for($_) - ) for @recheck; + $prop, $sol_rps->dependencies_for($prop) + ); trace 'step.recheck.done' => 'yay';