| ... | @@ -716,14 +716,12 @@ pub fn main(init: process.Init.Minimal) !void { | ... | @@ -716,14 +716,12 @@ pub fn main(init: process.Init.Minimal) !void { |
| 716 | .name = "@build", | 716 | .name = "@build", |
| 717 | .root_path = try root_build_src_path.toString(arena), | 717 | .root_path = try root_build_src_path.toString(arena), |
| 718 | }; | 718 | }; |
| 719 | defer build_mod.deps.deinit(gpa); | | |
| 720 | | 719 | |
| 721 | const deps_mod = try arena.create(CliModule); | 720 | const deps_mod = try arena.create(CliModule); |
| 722 | deps_mod.* = .{ | 721 | deps_mod.* = .{ |
| 723 | .name = "@dependencies", | 722 | .name = "@dependencies", |
| 724 | .root_path = undefined, | 723 | .root_path = undefined, |
| 725 | }; | 724 | }; |
| 726 | defer deps_mod.deps.deinit(gpa); | | |
| 727 | | 725 | |
| 728 | // This loop is re-evaluated when the build script exits with an indication that it | 726 | // This loop is re-evaluated when the build script exits with an indication that it |
| 729 | // could not continue due to missing lazy dependencies. | 727 | // could not continue due to missing lazy dependencies. |
| ... | @@ -876,7 +874,7 @@ pub fn main(init: process.Init.Minimal) !void { | ... | @@ -876,7 +874,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 876 | // Add a CliModule for each package's build.zig. | 874 | // Add a CliModule for each package's build.zig. |
| 877 | const hashes = job_queue.table.keys(); | 875 | const hashes = job_queue.table.keys(); |
| 878 | const fetches = job_queue.table.values(); | 876 | const fetches = job_queue.table.values(); |
| 879 | try deps_mod.deps.ensureUnusedCapacity(gpa, @intCast(hashes.len)); | 877 | try deps_mod.deps.ensureUnusedCapacity(arena, @intCast(hashes.len)); |
| 880 | for (hashes, fetches) |*hash, f| { | 878 | for (hashes, fetches) |*hash, f| { |
| 881 | if (f == &fetch) { | 879 | if (f == &fetch) { |
| 882 | // The first one is a dummy package for the current project. | 880 | // The first one is a dummy package for the current project. |
| ... | @@ -902,7 +900,7 @@ pub fn main(init: process.Init.Minimal) !void { | ... | @@ -902,7 +900,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 902 | if (!f.have_manifest) continue; | 900 | if (!f.have_manifest) continue; |
| 903 | const man = &f.manifest; | 901 | const man = &f.manifest; |
| 904 | const dep_names = man.dependencies.keys(); | 902 | const dep_names = man.dependencies.keys(); |
| 905 | try mod.deps.ensureUnusedCapacity(gpa, @intCast(dep_names.len)); | 903 | try mod.deps.ensureUnusedCapacity(arena, @intCast(dep_names.len)); |
| 906 | for (dep_names, man.dependencies.values()) |name, dep| { | 904 | for (dep_names, man.dependencies.values()) |name, dep| { |
| 907 | const dep_digest = Package.Fetch.depDigest( | 905 | const dep_digest = Package.Fetch.depDigest( |
| 908 | f.package_root, | 906 | f.package_root, |