| ... | ... | @@ -571,8 +571,18 @@ pub fn make( |
| 571 | 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); |
| 575 | | if (!has_side_effects) try step.finalizeManifestAndWatch(maker, &man); |
| 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 | 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 | 586 | return; |
| 577 | 587 | } |
| 578 | 588 | |
| ... | ... | @@ -591,7 +601,7 @@ pub fn make( |
| 591 | 601 | .args = protocol_args.items, |
| 592 | 602 | } }, |
| 593 | 603 | }); |
| 594 | | try runCommand( |
| 604 | runCommand( |
| 595 | 605 | arena, |
| 596 | 606 | run, |
| 597 | 607 | run_index, |
| ... | ... | @@ -606,7 +616,13 @@ pub fn make( |
| 606 | 616 | has_side_effects, |
| 607 | 617 | tmp_dir_path, |
| 608 | 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 | 627 | for (output_placeholders.items) |placeholder| { |
| 612 | 628 | const arg = placeholder.arg_index.get(conf); |
| ... | ... | @@ -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 | 706 | try populateGeneratedStdIo(maker, &conf_run, &digest); |
| 687 | 707 | try populateGeneratedPaths(maker, output_placeholders.items, &digest); |