acion infrastructure
[scpubgit/DKit.git] / lib / DX / Op / ProposeAction.pm
index ca9c38d..7031b4f 100644 (file)
@@ -18,7 +18,9 @@ sub run {
   my ($self, $state) = @_;
   ($state, my %args) = $self->_expand_args($state, %{$self->_arg_map});
   my @vars = @args{sort keys %args};
-  my $action = $self->builder->(@vars);
+  my @deps = $state->action_dependencies(map $_->id, @vars);
+  my $action = $self->builder->(@vars)
+                    ->but(dependencies => \@deps);
   my ($id, $value) = $action->expected_effect;
   my $var = $state->by_id->{$id}->with_value($value)->with_action($action);
   $state->but(by_id => { %{$state->by_id}, $id => $var })