| ... | @@ -1451,7 +1451,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { | ... | @@ -1451,7 +1451,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig { |
| 1451 | if (config_man) |man| for (configuration.path_deps) |path_dep| { | 1451 | if (config_man) |man| for (configuration.path_deps) |path_dep| { |
| 1452 | switch (path_dep.flags.mode) { | 1452 | switch (path_dep.flags.mode) { |
| 1453 | .directory => {}, // TODO | 1453 | .directory => {}, // TODO |
| 1454 | .contents => try man.addPathPost(confPathDepToCachePath(graph, &configuration, path_dep)), | 1454 | .contents => try man.addPathPost(try confPathDepToCachePath(arena, graph, &configuration, path_dep)), |
| 1455 | .metadata => {}, // TODO | 1455 | .metadata => {}, // TODO |
| 1456 | } | 1456 | } |
| 1457 | }; | 1457 | }; |
| ... | @@ -3917,7 +3917,12 @@ const Templates = struct { | ... | @@ -3917,7 +3917,12 @@ const Templates = struct { |
| 3917 | } | 3917 | } |
| 3918 | }; | 3918 | }; |
| 3919 | | 3919 | |
| 3920 | fn confPathDepToCachePath(graph: *const Graph, c: *const Configuration, path_dep: Configuration.PathDep) Path { | 3920 | fn confPathDepToCachePath( |
| | 3921 | arena: Allocator, |
| | 3922 | graph: *const Graph, |
| | 3923 | c: *const Configuration, |
| | 3924 | path_dep: Configuration.PathDep, |
| | 3925 | ) Allocator.Error!Path { |
| 3921 | const sub_path = path_dep.sub.slice(c); | 3926 | const sub_path = path_dep.sub.slice(c); |
| 3922 | return switch (path_dep.flags.base) { | 3927 | return switch (path_dep.flags.base) { |
| 3923 | .cwd => .{ | 3928 | .cwd => .{ |
| ... | @@ -3933,11 +3938,11 @@ fn confPathDepToCachePath(graph: *const Graph, c: *const Configuration, path_dep | ... | @@ -3933,11 +3938,11 @@ fn confPathDepToCachePath(graph: *const Graph, c: *const Configuration, path_dep |
| 3933 | .sub_path = sub_path, | 3938 | .sub_path = sub_path, |
| 3934 | }, | 3939 | }, |
| 3935 | .build_root => .{ | 3940 | .build_root => .{ |
| 3936 | .root_dir = switch (path_dep.pkg.unwrap().?) { | 3941 | .root_dir = graph.build_root_directory, |
| 3937 | .root => graph.build_root_directory, | 3942 | .sub_path = switch (path_dep.pkg.unwrap().?) { |
| 3938 | _ => @panic("TODO"), | 3943 | .root => sub_path, |
| | 3944 | else => |index| try Dir.path.join(arena, &.{ index.get(c).?.root_path.slice(c), sub_path }), |
| 3939 | }, | 3945 | }, |
| 3940 | .sub_path = sub_path, | | |
| 3941 | }, | 3946 | }, |
| 3942 | .zig_lib => .{ | 3947 | .zig_lib => .{ |
| 3943 | .root_dir = graph.zig_lib_directory, | 3948 | .root_dir = graph.zig_lib_directory, |