Commit | Line | Data |
251177ea |
1 | package DX::Step::CompleteRecheck; |
2 | |
3 | use DX::Class; |
4 | |
5 | with 'DX::Role::Step'; |
6 | |
7 | has was_recheck_for => (is => 'ro', required => 1); |
8 | |
2ccd4b58 |
9 | has resume_search_state => (is => 'ro', required => 1); |
251177ea |
10 | |
11 | sub apply_to { |
12 | my ($self, $ss) = @_; |
13 | |
14 | my $prop = $self->was_recheck_for; |
2ccd4b58 |
15 | my $re_ss = $self->resume_search_state; |
251177ea |
16 | my $re_hyp = $re_ss->current_hypothesis; |
2ccd4b58 |
17 | my $re_rps = $re_hyp->resolved_propositions; |
251177ea |
18 | |
2ccd4b58 |
19 | my $rps = $re_rps->with_updated_dependencies_for( |
251177ea |
20 | $prop, |
21 | $ss->current_hypothesis |
22 | ->resolved_propositions |
23 | ->dependencies_for($prop) |
24 | ); |
25 | |
26 | return $re_ss->but( |
27 | current_hypothesis => $re_hyp->but( |
2ccd4b58 |
28 | resolved_propositions => $rps |
251177ea |
29 | ), |
251177ea |
30 | ); |
31 | } |
32 | |
33 | 1; |