| ... | @@ -571,8 +571,18 @@ pub fn make( | ... | @@ -571,8 +571,18 @@ pub fn make( |
| 571 | .args = protocol_args.items, | 571 | .args = protocol_args.items, |
| 572 | } }, | 572 | } }, |
| 573 | }); | 573 | }); |
| 574 | try runCommand(arena, run, run_index, maker, progress_node, argv_list.items, &.{}, &.{}, &.{}, &.{}, null, has_side_effects, output_dir_path, null); | 574 | runCommand(arena, run, run_index, maker, progress_node, argv_list.items, &.{}, &.{}, &.{}, &.{}, null, has_side_effects, output_dir_path, null) catch |err| switch (err) { |
| 575 | if (!has_side_effects) try step.finalizeManifestAndWatch(maker, &man); | 575 | else => |e| return e, |
| | 576 | error.MakeFailed, error.MakeSkipped => |e| { |
| | 577 | try step.setWatchInputsFromManifest(maker, &man); |
| | 578 | return e; |
| | 579 | }, |
| | 580 | }; |
| | 581 | if (has_side_effects) { |
| | 582 | try step.setWatchInputsFromManifest(maker, &man); |
| | 583 | } else { |
| | 584 | try step.finalizeManifestAndWatch(maker, &man); |
| | 585 | } |
| 576 | return; | 586 | return; |
| 577 | } | 587 | } |
| 578 | | 588 | |
| ... | @@ -591,7 +601,7 @@ pub fn make( | ... | @@ -591,7 +601,7 @@ pub fn make( |
| 591 | .args = protocol_args.items, | 601 | .args = protocol_args.items, |
| 592 | } }, | 602 | } }, |
| 593 | }); | 603 | }); |
| 594 | try runCommand( | 604 | runCommand( |
| 595 | arena, | 605 | arena, |
| 596 | run, | 606 | run, |
| 597 | run_index, | 607 | run_index, |
| ... | @@ -606,7 +616,13 @@ pub fn make( | ... | @@ -606,7 +616,13 @@ pub fn make( |
| 606 | has_side_effects, | 616 | has_side_effects, |
| 607 | tmp_dir_path, | 617 | tmp_dir_path, |
| 608 | null, | 618 | null, |
| 609 | ); | 619 | ) catch |err| switch (err) { |
| | 620 | else => |e| return e, |
| | 621 | error.MakeFailed, error.MakeSkipped => |e| { |
| | 622 | try step.setWatchInputsFromManifest(maker, &man); |
| | 623 | return e; |
| | 624 | }, |
| | 625 | }; |
| 610 | | 626 | |
| 611 | for (output_placeholders.items) |placeholder| { | 627 | for (output_placeholders.items) |placeholder| { |
| 612 | const arg = placeholder.arg_index.get(conf); | 628 | const arg = placeholder.arg_index.get(conf); |
| ... | @@ -681,7 +697,11 @@ pub fn make( | ... | @@ -681,7 +697,11 @@ pub fn make( |
| 681 | }; | 697 | }; |
| 682 | } | 698 | } |
| 683 | | 699 | |
| 684 | if (!has_side_effects) try step.finalizeManifestAndWatch(maker, &man); | 700 | if (has_side_effects) { |
| | 701 | try step.setWatchInputsFromManifest(maker, &man); |
| | 702 | } else { |
| | 703 | try step.finalizeManifestAndWatch(maker, &man); |
| | 704 | } |
| 685 | | 705 | |
| 686 | try populateGeneratedStdIo(maker, &conf_run, &digest); | 706 | try populateGeneratedStdIo(maker, &conf_run, &digest); |
| 687 | try populateGeneratedPaths(maker, output_placeholders.items, &digest); | 707 | try populateGeneratedPaths(maker, output_placeholders.items, &digest); |