authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-06 21:58:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 16:54:31-07:00
logaed6adb6e9f5b313c7cf6158bcd8fa5adaad7ef1
tree23134be8de5bbae4faa007789b77384085bde80a
parentf708c5fafc5087a2518e0dc7acf986b59673dddd

fix Fetch.JobQueue.consolidateErrors


1 files changed, 4 insertions(+), 1 deletions(-)

src/Package/Fetch.zig+4-1
...@@ -93,9 +93,12 @@ pub const JobQueue = struct {...@@ -93,9 +93,12 @@ pub const JobQueue = struct {
93 /// Dumps all subsequent error bundles into the first one.93 /// Dumps all subsequent error bundles into the first one.
94 pub fn consolidateErrors(jq: *JobQueue) !void {94 pub fn consolidateErrors(jq: *JobQueue) !void {
95 const root = &jq.all_fetches.items[0].error_bundle;95 const root = &jq.all_fetches.items[0].error_bundle;
96 const gpa = root.gpa;
96 for (jq.all_fetches.items[1..]) |fetch| {97 for (jq.all_fetches.items[1..]) |fetch| {
97 if (fetch.error_bundle.root_list.items.len > 0) {98 if (fetch.error_bundle.root_list.items.len > 0) {
98 try root.addBundleAsRoots(fetch.error_bundle.tmpBundle());99 var bundle = try fetch.error_bundle.toOwnedBundle("");
100 defer bundle.deinit(gpa);
101 try root.addBundleAsRoots(bundle);
99 }102 }
100 }103 }
101 }104 }