authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-28 04:09:00 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-28 04:09:00 -07:00
log94650215c4ebc1d4570fdf10b3f179e5aed2c7ba
treeecda549bd84c007318f924fb4a8182e7cd00ecad
parenta8579cb2f378fb3f773e5907887dae37adce3c93

remove default allocator from common.CollectOptions


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

src/cmd/aquila/install.zig+1
...@@ -46,6 +46,7 @@ pub fn execute(args: [][]u8) !void {...@@ -46,6 +46,7 @@ pub fn execute(args: [][]u8) !void {
46 var fetchoptions = common.CollectOptions{46 var fetchoptions = common.CollectOptions{
47 .log = true,47 .log = true,
48 .update = false,48 .update = false,
49 .alloc = gpa,
49 };50 };
50 try fetchoptions.init();51 try fetchoptions.init();
51 const modpath = try common.get_modpath(cachepath, dep, &fetchoptions);52 const modpath = try common.get_modpath(cachepath, dep, &fetchoptions);
src/cmd/ci.zig+1
...@@ -22,6 +22,7 @@ pub fn do(cachepath: string, dir: std.fs.Dir) !void {...@@ -22,6 +22,7 @@ pub fn do(cachepath: string, dir: std.fs.Dir) !void {
22 .log = true,22 .log = true,
23 .update = false,23 .update = false,
24 .lock = try common.parse_lockfile(gpa, dir),24 .lock = try common.parse_lockfile(gpa, dir),
25 .alloc = gpa,
25 };26 };
26 const top_module = try common.collect_deps_deep(cachepath, dir, &options);27 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2728
src/cmd/fetch.zig+1
...@@ -24,6 +24,7 @@ pub fn execute(args: [][]u8) !void {...@@ -24,6 +24,7 @@ pub fn execute(args: [][]u8) !void {
24 var options = common.CollectOptions{24 var options = common.CollectOptions{
25 .log = should_update,25 .log = should_update,
26 .update = should_update,26 .update = should_update,
27 .alloc = gpa,
27 };28 };
28 const top_module = try common.collect_deps_deep(cachepath, dir, &options);29 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2930
src/cmd/license.zig+1
...@@ -24,6 +24,7 @@ pub fn execute(args: [][]u8) !void {...@@ -24,6 +24,7 @@ pub fn execute(args: [][]u8) !void {
24 var options = common.CollectOptions{24 var options = common.CollectOptions{
25 .log = false,25 .log = false,
26 .update = false,26 .update = false,
27 .alloc = gpa,
27 };28 };
28 const top_module = try common.collect_deps_deep(cachepath, dir, &options);29 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2930
src/cmd/sum.zig+1
...@@ -17,6 +17,7 @@ pub fn execute(args: [][]u8) !void {...@@ -17,6 +17,7 @@ pub fn execute(args: [][]u8) !void {
17 var options = common.CollectOptions{17 var options = common.CollectOptions{
18 .log = false,18 .log = false,
19 .update = false,19 .update = false,
20 .alloc = gpa,
20 };21 };
21 const top_module = try common.collect_deps_deep(cachepath, dir, &options);22 const top_module = try common.collect_deps_deep(cachepath, dir, &options);
2223
src/common.zig+1-1
...@@ -19,7 +19,7 @@ pub const CollectOptions = struct {...@@ -19,7 +19,7 @@ pub const CollectOptions = struct {
19 log: bool,19 log: bool,
20 update: bool,20 update: bool,
21 lock: ?[]const [4]string = null,21 lock: ?[]const [4]string = null,
22 alloc: *std.mem.Allocator = std.heap.c_allocator,22 alloc: *std.mem.Allocator,
23 already_fetched: *std.ArrayList(string) = undefined,23 already_fetched: *std.ArrayList(string) = undefined,
2424
25 pub fn init(self: *CollectOptions) !void {25 pub fn init(self: *CollectOptions) !void {