| ... | @@ -785,7 +785,10 @@ pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: La | ... | @@ -785,7 +785,10 @@ pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: La |
| 785 | const pkg_path = try maker.packagePath(arena, source_path.owner, sub_path); | 785 | const pkg_path = try maker.packagePath(arena, source_path.owner, sub_path); |
| 786 | try addWatchInputPath(step, maker, pkg_path); | 786 | try addWatchInputPath(step, maker, pkg_path); |
| 787 | }, | 787 | }, |
| 788 | .relative => |relative| try addWatchInputPath(step, maker, maker.relativePath(relative)), | 788 | .relative => |relative| { |
| | 789 | const resolved_path = try maker.relativePath(arena, relative); |
| | 790 | try addWatchInputPath(step, maker, resolved_path); |
| | 791 | }, |
| 789 | // Nothing to watch because this dependency edge is modeled instead via `dependants`. | 792 | // Nothing to watch because this dependency edge is modeled instead via `dependants`. |
| 790 | .generated => {}, | 793 | .generated => {}, |
| 791 | } | 794 | } |
| ... | @@ -799,16 +802,19 @@ pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: La | ... | @@ -799,16 +802,19 @@ pub fn addWatchInput(step: *Step, maker: *Maker, arena: Allocator, lazy_file: La |
| 799 | /// `addDirectoryWatchInputFromPath` if and only if this function returns | 802 | /// `addDirectoryWatchInputFromPath` if and only if this function returns |
| 800 | /// `true`. | 803 | /// `true`. |
| 801 | pub fn addDirectoryWatchInput(step: *Step, maker: *Maker, lazy_directory: LazyPath) Allocator.Error!bool { | 804 | pub fn addDirectoryWatchInput(step: *Step, maker: *Maker, lazy_directory: LazyPath) Allocator.Error!bool { |
| | 805 | const graph = maker.graph; |
| | 806 | const arena = graph.arena; // TODO don't leak into the process arena |
| 802 | switch (lazy_directory) { | 807 | switch (lazy_directory) { |
| 803 | .source_path => |source_path| { | 808 | .source_path => |source_path| { |
| 804 | const conf = &maker.scanned_config.configuration; | 809 | const conf = &maker.scanned_config.configuration; |
| 805 | const graph = maker.graph; | | |
| 806 | const arena = graph.arena; // TODO don't leak into the process arena | | |
| 807 | const sub_path = source_path.sub_path.slice(conf); | 810 | const sub_path = source_path.sub_path.slice(conf); |
| 808 | const pkg_path = try maker.packagePath(arena, source_path.owner, sub_path); | 811 | const pkg_path = try maker.packagePath(arena, source_path.owner, sub_path); |
| 809 | try addDirectoryWatchInputFromPath(step, maker, pkg_path); | 812 | try addDirectoryWatchInputFromPath(step, maker, pkg_path); |
| 810 | }, | 813 | }, |
| 811 | .relative => |relative| try addDirectoryWatchInputFromPath(step, maker, maker.relativePath(relative)), | 814 | .relative => |relative| { |
| | 815 | const resolved_path = try maker.relativePath(arena, relative); |
| | 816 | try addDirectoryWatchInputFromPath(step, maker, resolved_path); |
| | 817 | }, |
| 812 | // Nothing to watch because this dependency edge is modeled instead via `dependants`. | 818 | // Nothing to watch because this dependency edge is modeled instead via `dependants`. |
| 813 | .generated => return false, | 819 | .generated => return false, |
| 814 | } | 820 | } |