authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:17:44 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:17:44 -08:00
log1d9b3e920bc039a8d061d4fb5233c77a10a4572a
tree9db97c3f629fa9ad59cede686667e2b9ad4b2a17
parent38b28a222b3b0f897c4918fd85547045c2e2bab7

give Dep.keep a default value


2 files changed, 1 insertions(+), 3 deletions(-)

src/common.zig-2
...@@ -329,7 +329,6 @@ pub fn add_files_package(alloc: *std.mem.Allocator, pkg_name: string, mdir: std....@@ -329,7 +329,6 @@ pub fn add_files_package(alloc: *std.mem.Allocator, pkg_name: string, mdir: std.
329 .version = "absolute",329 .version = "absolute",
330 .yaml = null,330 .yaml = null,
331 .deps = &.{},331 .deps = &.{},
332 .keep = false,
333 };332 };
334 var options = CollectOptions{333 var options = CollectOptions{
335 .log = false,334 .log = false,
...@@ -373,7 +372,6 @@ pub fn parse_lockfile(alloc: *std.mem.Allocator, dir: std.fs.Dir) ![]const [4]st...@@ -373,7 +372,6 @@ pub fn parse_lockfile(alloc: *std.mem.Allocator, dir: std.fs.Dir) ![]const [4]st
373 .main = "",372 .main = "",
374 .yaml = null,373 .yaml = null,
375 .deps = &.{},374 .deps = &.{},
376 .keep = false,
377 };375 };
378 try list.append([4]string{376 try list.append([4]string{
379 try asdep.clean_path(),377 try asdep.clean_path(),
src/util/dep.zig+1-1
...@@ -26,7 +26,7 @@ pub const Dep = struct {...@@ -26,7 +26,7 @@ pub const Dep = struct {
26 except_os: []const string = &.{},26 except_os: []const string = &.{},
27 yaml: ?yaml.Mapping,27 yaml: ?yaml.Mapping,
28 deps: []zigmod.Dep,28 deps: []zigmod.Dep,
29 keep: bool,29 keep: bool = false,
3030
31 pub fn clean_path(self: Dep) !string {31 pub fn clean_path(self: Dep) !string {
32 if (self.type == .local) {32 if (self.type == .local) {