From d312857810eefe270ea5edb8f5517ce74c839d54 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Thu, 29 Jul 2021 04:57:54 -0700 Subject: [PATCH] update to zig master `0.9.0-dev.677` --- .circleci/config.yml | 2 +- README.md | 2 +- docs/README.md | 2 +- src/common.zig | 4 +++- src/util/funcs.zig | 4 +++- src/util/module.zig | 4 ++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ce528efb39e69faf6aeb30bfa2f3fe996de7f58..08a9cf2ff39a86e6a434a8d0234e93e0717a35ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ jobs: - run: git submodule update --init --recursive - run: apt -y install xz-utils jq - - run: ./download_zig.sh 0.9.0-dev.642+b87105c92 + - run: ./download_zig.sh 0.9.0-dev.677+ed174b738 - run: zig version - run: zig env - run: zig build -Dbootstrap diff --git a/README.md b/README.md index 2f9b02edd4e46a3bbbed369c316ae977c4192ee3..ccda0fe205baf6726f9fb30b83c3f7ae639a5a20 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A package manager for the Zig programming language. - https://github.com/nektro/zigmod/releases ## Built With -- Zig master `0.9.0-dev.642+b87105c92` +- Zig master `0.9.0-dev.677+ed174b738` ### Build from Source Initially, diff --git a/docs/README.md b/docs/README.md index 08a2aa653ccbf98327c47e1dc4295efe92f6e4d9..0b65b57b14037c5701e3ce67ad2f779bee284fd6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed. As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. -The most recent release Zigmod was verified to work with is `0.9.0-dev.642+b87105c92`. +The most recent release Zigmod was verified to work with is `0.9.0-dev.677+ed174b738`. ## Download You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. diff --git a/src/common.zig b/src/common.zig index e815f34d7f16c1e3bb8ca3b1740bbe1097954848..e74f281348bcb8640f497501dc7d782a64c367c3 100644 --- a/src/common.zig +++ b/src/common.zig @@ -285,7 +285,9 @@ fn add_files_package(pkg_name: []const u8, dirs: []const []const u8, parent_name defer map.deinit(); for (dirs) |dir_path| { - var walker = try std.fs.walkPath(gpa, dir_path); + const dir = try std.fs.cwd().openDir(dir_path, .{ .iterate = true }); + var walker = try dir.walk(gpa); + defer walker.deinit(); while (try walker.next()) |p| { if (p.kind == .Directory) { continue; diff --git a/src/util/funcs.zig b/src/util/funcs.zig index fb6ae10a542cc97f21442cad28e7929c73a0a272..930294ae01e2ea98c16a7e0e0681a6c7f963196c 100644 --- a/src/util/funcs.zig +++ b/src/util/funcs.zig @@ -142,7 +142,9 @@ pub fn list_contains_gen(comptime T: type, haystack: []const T, needle: T) bool } pub fn file_list(dpath: []const u8, list: *std.ArrayList([]const u8)) !void { - var walk = try std.fs.walkPath(gpa, dpath); + const dir = try std.fs.cwd().openDir(dpath, .{ .iterate = true }); + var walk = try dir.walk(gpa); + defer walk.deinit(); while (true) { if (try walk.next()) |entry| { if (entry.kind != .File) { diff --git a/src/util/module.zig b/src/util/module.zig index 70302031aec366b5fbb8e3783e13db8f5333bfce..943b8a7ebc48e63fee181a521f484e6765a88324 100644 --- a/src/util/module.zig +++ b/src/util/module.zig @@ -61,8 +61,8 @@ pub const Module = struct { const file_list_2 = &std.ArrayList([]const u8).init(gpa); defer file_list_2.deinit(); for (file_list_1.items) |item| { - const _a = u.trim_prefix(item, cdpath)[1..]; - const _b = u.trim_prefix(_a, self.clean_path)[1..]; + const _a = u.trim_prefix(item, cdpath); + const _b = u.trim_prefix(_a, self.clean_path); if (_b[0] == '.') continue; try file_list_2.append(_b); } -- 2.54.0