diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9c2a65792d5da15415aa9ff84bc0672594f713f7..3acb409224c2226ce079389cb9e582f4d8e127fe 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -27,7 +27,7 @@ jobs: uses: mlugg/setup-zig@v1 with: mirror: "http://mirrors.nektro.net/s3cgi" - version: "0.13.0" + version: "0.14.0" - run: zig version - run: zig env diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 242c6543c6e1ff6c1a3e6a50e3a813c1da7eb05d..813d87109a676e291742820ee51026dc220bae94 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -20,7 +20,7 @@ jobs: uses: mlugg/setup-zig@v1 with: mirror: "http://mirrors.nektro.net/s3cgi" - version: "0.13.0" + version: "0.14.0" - run: zig version - run: zig env diff --git a/README.md b/README.md index 7ec64afcb67879a6d8c480ce1958cbc8d8ff969b..ac073f203d2387e92e271b782a957f9b60845410 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,32 @@ # zigmod + ![loc](https://sloc.xyz/github/nektro/zigmod) [![license](https://img.shields.io/github/license/nektro/zigmod.svg)](https://github.com/nektro/zigmod/blob/master/LICENSE) [![discord](https://img.shields.io/discord/551971034593755159.svg?logo=discord)](https://discord.gg/P6Y4zQC) [![release](https://img.shields.io/github/v/release/nektro/zigmod)](https://github.com/nektro/zigmod/releases/latest) [![downloads](https://img.shields.io/github/downloads/nektro/zigmod/total.svg)](https://github.com/nektro/zigmod/releases) +[![nektro @ github sponsors](https://img.shields.io/badge/sponsors-nektro-purple?logo=github)](https://github.com/sponsors/nektro) +[![Zig](https://img.shields.io/badge/Zig-0.14-f7a41d)](https://ziglang.org/) A package manager for the Zig programming language. ## Zig + - https://ziglang.org/ - https://github.com/ziglang/zig - https://github.com/ziglang/zig/wiki/Community ## Download + - https://github.com/nektro/zigmod/releases ## Built With -- Zig `0.13.0` + +- Zig `0.14.0` - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) ### Build from Source + ``` $ git clone https://github.com/nektro/zigmod $ cd zigmod @@ -27,6 +34,7 @@ $ zig build -j1 ``` ## Usage + Check out our [docs](docs/) or the website: https://nektro.github.io/zigmod/. There is now also a tutorial-style getting started guide that goes over various use cases that Zigmod provides and caters to. It is [available here](docs/tutorial.md). @@ -34,8 +42,10 @@ There is now also a tutorial-style getting started guide that goes over various A package index for Zigmod packages is also available at https://aquila.red/. ## Contact + - hello@nektro.net - https://twitter.com/nektro ## License + MIT diff --git a/build.zig b/build.zig index 35ef150a8f64d686f166f2a6e90a3d8dd8cab2cf..fbc1ce85fae2b1d35bb204682ff26e7bb38875b6 100644 --- a/build.zig +++ b/build.zig @@ -4,6 +4,8 @@ const builtin = @import("builtin"); const deps = @import("./deps.zig"); pub fn build(b: *std.Build) void { + b.reference_trace = 256; + const target = b.standardTargetOptions(.{}); const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug; const use_full_name = b.option(bool, "use-full-name", "") orelse false; @@ -18,6 +20,7 @@ pub fn build(b: *std.Build) void { const tag = b.option(string, "tag", "") orelse "dev"; const strip = b.option(bool, "strip", "Build without debug info.") orelse false; const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false; + _ = &disable_llvm; // macos can't mix the flags rn because it needs llvm but also can't use lld const exe_options = b.addOptions(); exe.root_module.addImport("build_options", exe_options.createModule()); @@ -25,8 +28,8 @@ pub fn build(b: *std.Build) void { deps.addAllTo(exe); exe.root_module.strip = strip; - exe.use_llvm = !disable_llvm; - exe.use_lld = !disable_llvm; + // exe.use_llvm = !disable_llvm; + // exe.use_lld = !disable_llvm; b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); diff --git a/build_all_zig.sh b/build_all_zig.sh index b68a88517cc9c7ac9a95bfd40f68a2d985e61952..f807d59d8d60b9ca5297ebc5ff4b8c0807cc5713 100755 --- a/build_all_zig.sh +++ b/build_all_zig.sh @@ -3,8 +3,6 @@ set -e zig build -zigmod license > licenses.txt -zigmod sum targets=" x86_64-linux-musl @@ -15,8 +13,8 @@ aarch64-macos-none aarch64-windows-gnu riscv64-linux-musl powerpc64le-linux-musl -mips64-linux-musl " +# mips64-linux-musl # https://github.com/ziglang/zig/issues/23965 for item in $targets do diff --git a/deps.zig b/deps.zig index 2fc62fee54b381a6976823433ace06e2a6d0a429..7dbd3623239860b6a85495b835b629c0f496afc7 100644 --- a/deps.zig +++ b/deps.zig @@ -26,7 +26,7 @@ pub const GitExactStep = struct { var urlpath = url; urlpath = trimPrefix(u8, urlpath, "https://"); urlpath = trimPrefix(u8, urlpath, "git://"); - const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.cache_root.path.?, urlpath, commit }); + const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.graph.global_cache_root.path.?, urlpath, commit }); flip(std.fs.cwd().access(repopath, .{})) catch return result; var clonestep = std.Build.Step.Run.create(b, "clone"); @@ -40,9 +40,9 @@ pub const GitExactStep = struct { return result; } - fn make(step: *std.Build.Step, prog_node: std.Progress.Node) !void { + fn make(step: *std.Build.Step, options: std.Build.Step.MakeOptions) !void { _ = step; - _ = prog_node; + _ = options; } }; @@ -54,25 +54,25 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step { const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else "."; if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? }); } - step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "407a4c7b869ee3d10db520fdfae8b9faf9b2adb5").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "4c84770a8a2d10b9a9bb1157d69f49e8cd398e1a").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "c0a8d949c5cf8c72e2dfdaddee9fb7854b1c217e").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zfetch", "c2883dd57698f223b2cfdccfc7ea357a12e5f741").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "b0d7878680fff57fd5ed9e7e4d2694acc0b81255").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "3049b32e72045d8cefd64b8a7f9b0b8f9e76d80a").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "d4f8a6437cb5068072e4df338af77dde15ad3625").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "11805225d52bc28c2edc31fd7a855bd1aa16bc67").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "d6005ee08b2f5ce3c4554fa7f91e733f58b1a434").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "75a9745d9100b17a9443e6a0051cb140ffbcd0b1").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "03b5392e53513a0f90aa5c10219c7caee6383997").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "1c0e475b056ccc6a343187702ee4f3dc415e07cb").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "d683ae4d499c2a1f7f8c9cdd7304cd5a3c766e76").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "f1830fbbd78a31d54d8469a0243cb904e7295e10").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "b9a93152af3ba73e5f681f73a67f0d676e2ad433").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "662774eedca41771f9ebd1ab45cfdc8e4319d4b4").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "4489a2ed0b3f90e962527eaf9ac9c0203a99094a").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "d21b419d808215e1f82605fdaddc49750bfa3bca").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "f1a72055884bd5bc0ffb93ba706c9212139d61b9").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "b0e810ba8508681935ea7a5af857cc197dcdd279").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zfetch", "ec3c02114dec5deff3310b590e69ce0aeb67b95b").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "18c6c24d692df31a17f78299c4a539c935d1feb1").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "9b85f69e9adc28ec70a217c07b86046e331d3485").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "5c4543acadb6c24c05d68f79e4c9d2093457a629").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-git", "b206fa9978ef2cc06bab4d307c7ed07f1f3b88af").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "3bee7b28a37f3d0898119ef095687467fa907d4b").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-intrusive-parser", "eabd7f7b9b8defdbba5504d9ce2c93e1065ca34b").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "92dd6f67bbb52f060d5ac20719142b0211854290").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "abcde0e877df670f96671bdca5b81b0e809df0d4").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "86fc3f6cb4dcc2847832524a3f80d520c7a6577c").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "a4a66621b3cccdf05e62e0152cf2cd43e9072e97").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "25165db8e626434ab6eae2cff64ba5e72e4fa062").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-tracer", "cc75b7f652c7cd51cbfa6e3c7e8155cd153bb68b").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "10e8df67c534e186d851ed48e8895374d9a454e9").step); step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "ab212bd208f0eb54d85861679677c5e3dc9bb543").step); - step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "1cceeb70e77dec941a4178160ff6c8d05a74de6f").step); + step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "aa24df42183ad415d10bc0a33e6238c437fc0f59").step); step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step); return step; } @@ -97,6 +97,8 @@ pub fn addAllTo(exe: *std.Build.Step.Compile) void { const module = pkg.module(exe, fetch_step); exe.root_module.addImport(pkg.name, module); } + // clear module memo cache so addAllTo can be called more than once in the same build.zig + inline for (comptime std.meta.declarations(package_data)) |decl| @field(package_data, decl.name).module_memo = null; } var link_lib_c = false; @@ -121,7 +123,7 @@ pub const Package = struct { const result = b.createModule(.{}); const dummy_library = b.addStaticLibrary(.{ .name = "dummy", - .target = exe.root_module.resolved_target orelse b.host, + .target = exe.root_module.resolved_target orelse b.graph.host, .optimize = exe.root_module.optimize.?, }); dummy_library.step.dependOn(fetch_step); @@ -168,97 +170,97 @@ pub const Package = struct { }; fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void { - const min = std.SemanticVersion.parse("0.13.0") catch return; + const min = std.SemanticVersion.parse("0.14.0") catch return; if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min})); } pub const package_data = struct { pub var _o6ogpor87xc2 = Package{ - .store = "/git/github.com/marlersoft/zigwin32/407a4c7b869ee3d10db520fdfae8b9faf9b2adb5", + .store = "/git/github.com/marlersoft/zigwin32/d21b419d808215e1f82605fdaddc49750bfa3bca", .name = "win32", - .entry = "/git/github.com/marlersoft/zigwin32/407a4c7b869ee3d10db520fdfae8b9faf9b2adb5/win32.zig", + .entry = "/git/github.com/marlersoft/zigwin32/d21b419d808215e1f82605fdaddc49750bfa3bca/win32.zig", }; pub var _u7sysdckdymi = Package{ - .store = "/git/github.com/nektro/arqv-ini/4c84770a8a2d10b9a9bb1157d69f49e8cd398e1a", + .store = "/git/github.com/nektro/arqv-ini/f1a72055884bd5bc0ffb93ba706c9212139d61b9", .name = "ini", - .entry = "/git/github.com/nektro/arqv-ini/4c84770a8a2d10b9a9bb1157d69f49e8cd398e1a/src/ini.zig", + .entry = "/git/github.com/nektro/arqv-ini/f1a72055884bd5bc0ffb93ba706c9212139d61b9/src/ini.zig", }; pub var _csbnipaad8n7 = Package{ - .store = "/git/github.com/nektro/iguanaTLS/c0a8d949c5cf8c72e2dfdaddee9fb7854b1c217e", + .store = "/git/github.com/nektro/iguanaTLS/b0e810ba8508681935ea7a5af857cc197dcdd279", .name = "iguanaTLS", - .entry = "/git/github.com/nektro/iguanaTLS/c0a8d949c5cf8c72e2dfdaddee9fb7854b1c217e/src/main.zig", + .entry = "/git/github.com/nektro/iguanaTLS/b0e810ba8508681935ea7a5af857cc197dcdd279/src/main.zig", }; pub var _s84v9o48ucb0 = Package{ - .store = "/git/github.com/nektro/zig-ansi/b0d7878680fff57fd5ed9e7e4d2694acc0b81255", + .store = "/git/github.com/nektro/zig-ansi/18c6c24d692df31a17f78299c4a539c935d1feb1", .name = "ansi", - .entry = "/git/github.com/nektro/zig-ansi/b0d7878680fff57fd5ed9e7e4d2694acc0b81255/src/lib.zig", + .entry = "/git/github.com/nektro/zig-ansi/18c6c24d692df31a17f78299c4a539c935d1feb1/src/lib.zig", }; pub var _f7dubzb7cyqe = Package{ - .store = "/git/github.com/nektro/zig-extras/d4f8a6437cb5068072e4df338af77dde15ad3625", + .store = "/git/github.com/nektro/zig-extras/5c4543acadb6c24c05d68f79e4c9d2093457a629", .name = "extras", - .entry = "/git/github.com/nektro/zig-extras/d4f8a6437cb5068072e4df338af77dde15ad3625/src/lib.zig", + .entry = "/git/github.com/nektro/zig-extras/5c4543acadb6c24c05d68f79e4c9d2093457a629/src/lib.zig", }; pub var _c1xirp1ota5p = Package{ - .store = "/git/github.com/nektro/zig-inquirer/d6005ee08b2f5ce3c4554fa7f91e733f58b1a434", + .store = "/git/github.com/nektro/zig-inquirer/3bee7b28a37f3d0898119ef095687467fa907d4b", .name = "inquirer", - .entry = "/git/github.com/nektro/zig-inquirer/d6005ee08b2f5ce3c4554fa7f91e733f58b1a434/src/lib.zig", + .entry = "/git/github.com/nektro/zig-inquirer/3bee7b28a37f3d0898119ef095687467fa907d4b/src/lib.zig", .deps = &[_]*Package{ &_s84v9o48ucb0 }, }; pub var _7l3oxw6nqqws = Package{ - .store = "/git/github.com/nektro/zig-intrusive-parser/75a9745d9100b17a9443e6a0051cb140ffbcd0b1", + .store = "/git/github.com/nektro/zig-intrusive-parser/eabd7f7b9b8defdbba5504d9ce2c93e1065ca34b", .name = "intrusive-parser", - .entry = "/git/github.com/nektro/zig-intrusive-parser/75a9745d9100b17a9443e6a0051cb140ffbcd0b1/intrusive_parser.zig", + .entry = "/git/github.com/nektro/zig-intrusive-parser/eabd7f7b9b8defdbba5504d9ce2c93e1065ca34b/intrusive_parser.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe }, }; pub var _96h80ezrvj7i = Package{ - .store = "/git/github.com/nektro/zig-leven/1c0e475b056ccc6a343187702ee4f3dc415e07cb", + .store = "/git/github.com/nektro/zig-leven/abcde0e877df670f96671bdca5b81b0e809df0d4", .name = "leven", - .entry = "/git/github.com/nektro/zig-leven/1c0e475b056ccc6a343187702ee4f3dc415e07cb/src/lib.zig", + .entry = "/git/github.com/nektro/zig-leven/abcde0e877df670f96671bdca5b81b0e809df0d4/src/lib.zig", }; pub var _0npcrzfdlrvk = Package{ - .store = "/git/github.com/nektro/zig-licenses/d683ae4d499c2a1f7f8c9cdd7304cd5a3c766e76", + .store = "/git/github.com/nektro/zig-licenses/86fc3f6cb4dcc2847832524a3f80d520c7a6577c", .name = "licenses", - .entry = "/git/github.com/nektro/zig-licenses/d683ae4d499c2a1f7f8c9cdd7304cd5a3c766e76/src/lib.zig", + .entry = "/git/github.com/nektro/zig-licenses/86fc3f6cb4dcc2847832524a3f80d520c7a6577c/src/lib.zig", }; pub var _pt88y5d80m25 = Package{ - .store = "/git/github.com/nektro/zig-licenses-text/f1830fbbd78a31d54d8469a0243cb904e7295e10", + .store = "/git/github.com/nektro/zig-licenses-text/a4a66621b3cccdf05e62e0152cf2cd43e9072e97", .name = "licenses-text", - .entry = "/git/github.com/nektro/zig-licenses-text/f1830fbbd78a31d54d8469a0243cb904e7295e10/src/lib.zig", + .entry = "/git/github.com/nektro/zig-licenses-text/a4a66621b3cccdf05e62e0152cf2cd43e9072e97/src/lib.zig", }; pub var _2ovav391ivak = Package{ - .store = "/git/github.com/nektro/zig-detect-license/3049b32e72045d8cefd64b8a7f9b0b8f9e76d80a", + .store = "/git/github.com/nektro/zig-detect-license/9b85f69e9adc28ec70a217c07b86046e331d3485", .name = "detect-license", - .entry = "/git/github.com/nektro/zig-detect-license/3049b32e72045d8cefd64b8a7f9b0b8f9e76d80a/src/lib.zig", + .entry = "/git/github.com/nektro/zig-detect-license/9b85f69e9adc28ec70a217c07b86046e331d3485/src/lib.zig", .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i }, }; pub var _iecwp4b3bsfm = Package{ - .store = "/git/github.com/nektro/zig-time/b9a93152af3ba73e5f681f73a67f0d676e2ad433", + .store = "/git/github.com/nektro/zig-time/25165db8e626434ab6eae2cff64ba5e72e4fa062", .name = "time", - .entry = "/git/github.com/nektro/zig-time/b9a93152af3ba73e5f681f73a67f0d676e2ad433/time.zig", + .entry = "/git/github.com/nektro/zig-time/25165db8e626434ab6eae2cff64ba5e72e4fa062/time.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe }, }; pub var _ede2wygpe1iy = Package{ - .store = "/git/github.com/nektro/zig-tracer/662774eedca41771f9ebd1ab45cfdc8e4319d4b4", + .store = "/git/github.com/nektro/zig-tracer/cc75b7f652c7cd51cbfa6e3c7e8155cd153bb68b", .name = "tracer", - .entry = "/git/github.com/nektro/zig-tracer/662774eedca41771f9ebd1ab45cfdc8e4319d4b4/src/mod.zig", + .entry = "/git/github.com/nektro/zig-tracer/cc75b7f652c7cd51cbfa6e3c7e8155cd153bb68b/src/mod.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe }, }; pub var _0k64oe2nuzvj = Package{ - .store = "/git/github.com/nektro/zig-git/11805225d52bc28c2edc31fd7a855bd1aa16bc67", + .store = "/git/github.com/nektro/zig-git/b206fa9978ef2cc06bab4d307c7ed07f1f3b88af", .name = "git", - .entry = "/git/github.com/nektro/zig-git/11805225d52bc28c2edc31fd7a855bd1aa16bc67/git.zig", + .entry = "/git/github.com/nektro/zig-git/b206fa9978ef2cc06bab4d307c7ed07f1f3b88af/git.zig", .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy }, }; pub var _ocmr9rtohgcc = Package{ - .store = "/git/github.com/nektro/zig-json/03b5392e53513a0f90aa5c10219c7caee6383997", + .store = "/git/github.com/nektro/zig-json/92dd6f67bbb52f060d5ac20719142b0211854290", .name = "json", - .entry = "/git/github.com/nektro/zig-json/03b5392e53513a0f90aa5c10219c7caee6383997/json.zig", + .entry = "/git/github.com/nektro/zig-json/92dd6f67bbb52f060d5ac20719142b0211854290/json.zig", .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws }, }; pub var _g982zq6e8wsv = Package{ - .store = "/git/github.com/nektro/zig-yaml/4489a2ed0b3f90e962527eaf9ac9c0203a99094a", + .store = "/git/github.com/nektro/zig-yaml/10e8df67c534e186d851ed48e8895374d9a454e9", .name = "yaml", - .entry = "/git/github.com/nektro/zig-yaml/4489a2ed0b3f90e962527eaf9ac9c0203a99094a/yaml.zig", + .entry = "/git/github.com/nektro/zig-yaml/10e8df67c534e186d851ed48e8895374d9a454e9/yaml.zig", .deps = &[_]*Package{ &_8mdbh0zuneb0, &_f7dubzb7cyqe }, }; pub var _9k24gimke1an = Package{ @@ -267,15 +269,15 @@ pub const package_data = struct { .entry = "/git/github.com/truemedian/hzzp/ab212bd208f0eb54d85861679677c5e3dc9bb543/src/main.zig", }; pub var _ejw82j2ipa0e = Package{ - .store = "/git/github.com/nektro/zfetch/c2883dd57698f223b2cfdccfc7ea357a12e5f741", + .store = "/git/github.com/nektro/zfetch/ec3c02114dec5deff3310b590e69ce0aeb67b95b", .name = "zfetch", - .entry = "/git/github.com/nektro/zfetch/c2883dd57698f223b2cfdccfc7ea357a12e5f741/src/main.zig", + .entry = "/git/github.com/nektro/zfetch/ec3c02114dec5deff3310b590e69ce0aeb67b95b/src/main.zig", .deps = &[_]*Package{ &_9k24gimke1an, &_csbnipaad8n7 }, }; pub var _2ta738wrqbaq = Package{ - .store = "/git/github.com/ziglibs/known-folders/1cceeb70e77dec941a4178160ff6c8d05a74de6f", + .store = "/git/github.com/ziglibs/known-folders/aa24df42183ad415d10bc0a33e6238c437fc0f59", .name = "known-folders", - .entry = "/git/github.com/ziglibs/known-folders/1cceeb70e77dec941a4178160ff6c8d05a74de6f/known-folders.zig", + .entry = "/git/github.com/ziglibs/known-folders/aa24df42183ad415d10bc0a33e6238c437fc0f59/known-folders.zig", }; pub var _89ujp8gq842x = Package{ .name = "zigmod", diff --git a/docs/README.md b/docs/README.md index 0205ee1d54674336571368a9c1c1057cb44049bf..3899170e0cad2ac54d2b90f86476fd9ca18669cf 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 earliest Zig release this Zigmod was verified to work with is `0.13.0`. +The earliest Zig release this Zigmod was verified to work with is `0.14.0`. ## Download You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. diff --git a/src/cmd/aq.zig b/src/cmd/aq.zig index 7bb7b38e56965d7a86dd27dd6db61dc6a037f472..bf11afea62f15895f9965b92751d9a22096586d7 100644 --- a/src/cmd/aq.zig +++ b/src/cmd/aq.zig @@ -19,7 +19,7 @@ pub const commands = struct { pub const server_root = "https://aquila.red"; -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { if (args.len == 0) { std.debug.print("{s}\n", .{ \\This is a subcommand for use with https://github.com/nektro/aquila instances but has no default behavior on its own aside from showing you this nice help text. diff --git a/src/cmd/aquila/add.zig b/src/cmd/aquila/add.zig index cb80a69398d9c3c06d20f1dd2e00d346b2f903f2..c0d2f541f5082b120b72b6a5f7fc77ab1d602e08 100644 --- a/src/cmd/aquila/add.zig +++ b/src/cmd/aquila/add.zig @@ -8,7 +8,7 @@ const aq = @import("./../aq.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const pkg_id = args[0]; diff --git a/src/cmd/aquila/install.zig b/src/cmd/aquila/install.zig index e37f3ce6aa03098cd4c18ecacd7d2a5bde94cbe2..493df3f342cbfc96b7b0506289acc9219c094706 100644 --- a/src/cmd/aquila/install.zig +++ b/src/cmd/aquila/install.zig @@ -8,7 +8,7 @@ const zigmod = @import("../../lib.zig"); const u = @import("./../../util/funcs.zig"); const common = @import("./../../common.zig"); -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const home = try knownfolders.getPath(gpa, .home); diff --git a/src/cmd/aquila/showjson.zig b/src/cmd/aquila/showjson.zig index 68a3bfb2d7b1472d6ae2f5995f2c3a2916c73757..8cc9fcc52cb288fe7bc95d430f7dfcd7838879ea 100644 --- a/src/cmd/aquila/showjson.zig +++ b/src/cmd/aquila/showjson.zig @@ -6,7 +6,7 @@ const aq = @import("./../aq.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const out = std.io.getStdOut().writer(); diff --git a/src/cmd/aquila/update.zig b/src/cmd/aquila/update.zig index cc66f89b063b682029c33071dd027f4671b3082e..0c708b6c75d079e17e69afa53629194b7b9563b8 100644 --- a/src/cmd/aquila/update.zig +++ b/src/cmd/aquila/update.zig @@ -8,7 +8,7 @@ const zigmod = @import("../../lib.zig"); const u = @import("./../../util/funcs.zig"); const common = @import("./../../common.zig"); -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const home = try knownfolders.getPath(gpa, .home); diff --git a/src/cmd/ci.zig b/src/cmd/ci.zig index 75d070a9ad7176cc9233c687ab6da511a03c31ab..7407d971792ab674f2bb0a48b0faa4d4e80b2704 100644 --- a/src/cmd/ci.zig +++ b/src/cmd/ci.zig @@ -8,7 +8,7 @@ const common = @import("./../common.zig"); // Inspired by: // https://docs.npmjs.com/cli/v7/commands/npm-ci -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/fetch.zig b/src/cmd/fetch.zig index 6289ba0fb98a0ff3c84201d59095141796113dd5..98d29913bafe97ac16bc75613f5488c589d0cdca 100644 --- a/src/cmd/fetch.zig +++ b/src/cmd/fetch.zig @@ -11,7 +11,7 @@ const license = @import("./license.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const gpa = std.heap.c_allocator; @@ -89,7 +89,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ } \\ const b = exe.step.owner; \\ const result = b.createModule(.{ - \\ .target = exe.root_module.resolved_target orelse b.host, + \\ .target = exe.root_module.resolved_target, \\ }); \\ if (self.import) |capture| { \\ result.root_source_file = capture[1]; diff --git a/src/cmd/generate.zig b/src/cmd/generate.zig index 7a495e3678121af61ca09e2c52f1a70879c2379a..306b65255818528c207da9743fe675215cc815ca 100644 --- a/src/cmd/generate.zig +++ b/src/cmd/generate.zig @@ -9,7 +9,7 @@ const common = @import("./../common.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; @@ -67,7 +67,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ var urlpath = url; \\ urlpath = trimPrefix(u8, urlpath, "https://"); \\ urlpath = trimPrefix(u8, urlpath, "git://"); - \\ const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.cache_root.path.?, urlpath, commit }); + \\ const repopath = b.fmt("{s}/zigmod/deps/git/{s}/{s}", .{ b.graph.global_cache_root.path.?, urlpath, commit }); \\ flip(std.fs.cwd().access(repopath, .{})) catch return result; \\ \\ var clonestep = std.Build.Step.Run.create(b, "clone"); @@ -83,9 +83,9 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ return result; \\ } \\ - \\ fn make(step: *std.Build.Step, prog_node: std.Progress.Node) !void { + \\ fn make(step: *std.Build.Step, options: std.Build.Step.MakeOptions) !void { \\ _ = step; - \\ _ = prog_node; + \\ _ = options; \\ } \\}; \\ @@ -159,7 +159,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ const result = b.createModule(.{}); \\ const dummy_library = b.addStaticLibrary(.{ \\ .name = "dummy", - \\ .target = exe.root_module.resolved_target orelse b.host, + \\ .target = exe.root_module.resolved_target orelse b.graph.host, \\ .optimize = exe.root_module.optimize.?, \\ }); \\ dummy_library.step.dependOn(fetch_step); diff --git a/src/cmd/init.zig b/src/cmd/init.zig index c6559c5095fb223e1b04e34ca6cf5d0021fc84cd..5f6ffa01a7a3e8c4ba8478966737e3945a723dc2 100644 --- a/src/cmd/init.zig +++ b/src/cmd/init.zig @@ -13,7 +13,7 @@ const u = @import("./../util/funcs.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; std.debug.print("This utility will walk you through creating a zigmod.yml file.\n", .{}); diff --git a/src/cmd/license.zig b/src/cmd/license.zig index 5361afe41ff83662c02478b21b444e88e0c4ff42..0d0efc7b26aace12c9f3aea2fb3f088ed4f76cd6 100644 --- a/src/cmd/license.zig +++ b/src/cmd/license.zig @@ -15,7 +15,7 @@ const Map = std.StringArrayHashMap(*List); // Inspired by: // https://github.com/onur/cargo-license -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/sum.zig b/src/cmd/sum.zig index 301c7ce9579055e2eaa34e26540ffe75e9d98533..a34255e3d41054be15a2167e1b6a7f123db9bc65 100644 --- a/src/cmd/sum.zig +++ b/src/cmd/sum.zig @@ -8,7 +8,7 @@ const common = @import("./../common.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/version.zig b/src/cmd/version.zig index a262f2115ec234dd53cdc46aaf214a36867b90e6..e5cdcd6684a3b3acd839e2b193ee86f4d10063d4 100644 --- a/src/cmd/version.zig +++ b/src/cmd/version.zig @@ -7,7 +7,7 @@ const u = @import("./../util/funcs.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/zpm.zig b/src/cmd/zpm.zig index 071be0b7e88b80acecf9c278e7cc9ab664cf41d3..1b51ea9eb86aa34490dc1bfe1627930b61b5db36 100644 --- a/src/cmd/zpm.zig +++ b/src/cmd/zpm.zig @@ -30,7 +30,7 @@ pub const Package = struct { links: []const string, }; -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { if (args.len == 0) { std.debug.print("{s}\n", .{ \\This is a subcommand for use with https://github.com/zigtools/zpm-server instances but has no default behavior on its own aside from showing you this nice help text. diff --git a/src/cmd/zpm/add.zig b/src/cmd/zpm/add.zig index 4bee8c58b47bebbcb17d0ba9150e54587a207c57..6e472a2d4aeab7cbb6df14e0ea14402dc02ba931 100644 --- a/src/cmd/zpm/add.zig +++ b/src/cmd/zpm/add.zig @@ -10,7 +10,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, "packages" }); diff --git a/src/cmd/zpm/search.zig b/src/cmd/zpm/search.zig index af7268695bbfe598c1c6087ab0cc783fbaaa78c9..174d85c3bbade4e4568c42dd0279c38660f1f8db 100644 --- a/src/cmd/zpm/search.zig +++ b/src/cmd/zpm/search.zig @@ -7,7 +7,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/cmd/zpm/showjson.zig b/src/cmd/zpm/showjson.zig index dbbef7e1e7ff47b07a7c5d837a2575cb81e8ddd7..b6be07131f6d46e56055784c766464e3a1666415 100644 --- a/src/cmd/zpm/showjson.zig +++ b/src/cmd/zpm/showjson.zig @@ -6,7 +6,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; const out = std.io.getStdOut().writer(); diff --git a/src/cmd/zpm/tags.zig b/src/cmd/zpm/tags.zig index a798a15a002135f138e389a9ddf520e5c0233b54..789d284445742517e6ef6d1c69d0ee25cb022100 100644 --- a/src/cmd/zpm/tags.zig +++ b/src/cmd/zpm/tags.zig @@ -7,7 +7,7 @@ const zpm = @import("./../zpm.zig"); // // -pub fn execute(self_name: []const u8, args: [][]u8) !void { +pub fn execute(self_name: []const u8, args: [][:0]u8) !void { _ = self_name; _ = args; diff --git a/src/util/funcs.zig b/src/util/funcs.zig index 7ca645c1621450707bdda81f7e5f95fdec20d3a6..77b0d513d5d62b02e88c5226f6a6f579cbbcfbd2 100644 --- a/src/util/funcs.zig +++ b/src/util/funcs.zig @@ -27,7 +27,7 @@ pub fn fail(comptime fmt: string, args: anytype) noreturn { unreachable; } -pub fn try_index(comptime T: type, array: []T, n: usize, def: T) T { +pub fn try_index(comptime T: type, array: []const T, n: usize, def: T) T { if (array.len <= n) { return def; } @@ -87,7 +87,7 @@ const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"; pub fn random_string(comptime len: usize) [len]u8 { const now: u64 = @intCast(std.time.nanoTimestamp()); - var rand = std.rand.DefaultPrng.init(now); + var rand = std.Random.DefaultPrng.init(now); var r = rand.random(); var buf: [len]u8 = undefined; var i: usize = 0; diff --git a/zig.mod b/zig.mod index 2ccaa336fdb1d56d6199b29f53eed5ce39d2c1d7..f361827fbb1a894321e7b45db2a09bf018d9fb6a 100644 --- a/zig.mod +++ b/zig.mod @@ -3,7 +3,7 @@ name: zigmod main: src/lib.zig license: MIT description: A package manager for the Zig programming language. -min_zig_version: 0.13.0 +min_zig_version: 0.14.0 dependencies: - src: git https://github.com/nektro/zig-yaml - src: git https://github.com/nektro/zig-ansi diff --git a/zigmod.lock b/zigmod.lock index 1535edb59e62fdf717e34f93eae7fccb85246c4e..7eee7f164ffb6c188923ab0b3759ead1dc087d26 100644 --- a/zigmod.lock +++ b/zigmod.lock @@ -1,21 +1,21 @@ 2 -git https://github.com/marlersoft/zigwin32 commit-407a4c7b869ee3d10db520fdfae8b9faf9b2adb5 -git https://github.com/nektro/arqv-ini commit-4c84770a8a2d10b9a9bb1157d69f49e8cd398e1a -git https://github.com/nektro/iguanaTLS commit-c0a8d949c5cf8c72e2dfdaddee9fb7854b1c217e -git https://github.com/nektro/zfetch commit-c2883dd57698f223b2cfdccfc7ea357a12e5f741 -git https://github.com/nektro/zig-ansi commit-b0d7878680fff57fd5ed9e7e4d2694acc0b81255 -git https://github.com/nektro/zig-detect-license commit-3049b32e72045d8cefd64b8a7f9b0b8f9e76d80a -git https://github.com/nektro/zig-extras commit-d4f8a6437cb5068072e4df338af77dde15ad3625 -git https://github.com/nektro/zig-git commit-11805225d52bc28c2edc31fd7a855bd1aa16bc67 -git https://github.com/nektro/zig-inquirer commit-d6005ee08b2f5ce3c4554fa7f91e733f58b1a434 -git https://github.com/nektro/zig-intrusive-parser commit-75a9745d9100b17a9443e6a0051cb140ffbcd0b1 -git https://github.com/nektro/zig-json commit-03b5392e53513a0f90aa5c10219c7caee6383997 -git https://github.com/nektro/zig-leven commit-1c0e475b056ccc6a343187702ee4f3dc415e07cb -git https://github.com/nektro/zig-licenses commit-d683ae4d499c2a1f7f8c9cdd7304cd5a3c766e76 -git https://github.com/nektro/zig-licenses-text commit-f1830fbbd78a31d54d8469a0243cb904e7295e10 -git https://github.com/nektro/zig-time commit-b9a93152af3ba73e5f681f73a67f0d676e2ad433 -git https://github.com/nektro/zig-tracer commit-662774eedca41771f9ebd1ab45cfdc8e4319d4b4 -git https://github.com/nektro/zig-yaml commit-4489a2ed0b3f90e962527eaf9ac9c0203a99094a +git https://github.com/marlersoft/zigwin32 commit-d21b419d808215e1f82605fdaddc49750bfa3bca +git https://github.com/nektro/arqv-ini commit-f1a72055884bd5bc0ffb93ba706c9212139d61b9 +git https://github.com/nektro/iguanaTLS commit-b0e810ba8508681935ea7a5af857cc197dcdd279 +git https://github.com/nektro/zfetch commit-ec3c02114dec5deff3310b590e69ce0aeb67b95b +git https://github.com/nektro/zig-ansi commit-18c6c24d692df31a17f78299c4a539c935d1feb1 +git https://github.com/nektro/zig-detect-license commit-9b85f69e9adc28ec70a217c07b86046e331d3485 +git https://github.com/nektro/zig-extras commit-5c4543acadb6c24c05d68f79e4c9d2093457a629 +git https://github.com/nektro/zig-git commit-b206fa9978ef2cc06bab4d307c7ed07f1f3b88af +git https://github.com/nektro/zig-inquirer commit-3bee7b28a37f3d0898119ef095687467fa907d4b +git https://github.com/nektro/zig-intrusive-parser commit-eabd7f7b9b8defdbba5504d9ce2c93e1065ca34b +git https://github.com/nektro/zig-json commit-92dd6f67bbb52f060d5ac20719142b0211854290 +git https://github.com/nektro/zig-leven commit-abcde0e877df670f96671bdca5b81b0e809df0d4 +git https://github.com/nektro/zig-licenses commit-86fc3f6cb4dcc2847832524a3f80d520c7a6577c +git https://github.com/nektro/zig-licenses-text commit-a4a66621b3cccdf05e62e0152cf2cd43e9072e97 +git https://github.com/nektro/zig-time commit-25165db8e626434ab6eae2cff64ba5e72e4fa062 +git https://github.com/nektro/zig-tracer commit-cc75b7f652c7cd51cbfa6e3c7e8155cd153bb68b +git https://github.com/nektro/zig-yaml commit-10e8df67c534e186d851ed48e8895374d9a454e9 git https://github.com/truemedian/hzzp commit-ab212bd208f0eb54d85861679677c5e3dc9bb543 -git https://github.com/ziglibs/known-folders commit-1cceeb70e77dec941a4178160ff6c8d05a74de6f +git https://github.com/ziglibs/known-folders commit-aa24df42183ad415d10bc0a33e6238c437fc0f59 git https://github.com/yaml/libyaml tag-0.2.5