From e967f83127e1ae457a7fc4b1b0a203d4b08cd4b6 Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Fri, 7 Jun 2024 18:45:11 +0200 Subject: [PATCH 1/6] Upgrade httpz & curl for zig 0.13 --- build.zig.zon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index fcead1b3d..388628836 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -20,16 +20,16 @@ .hash = "1220c008492d9460c3be2b209600a948181e6efb3bf0d79a1633def499632e708f4b", }, .httpz = .{ - .url = "https://github.com/karlseguin/http.zig/archive/d05b9889382d240c826c7654a999e4da515bd20a.tar.gz", - .hash = "1220833d40f1767fa46b0efc4ae1af9bd5880a8e6fe7a66ee0215be916263f149e40", + .url = "https://github.com/karlseguin/http.zig/archive/79dad0f0cc652830cd8e49bf3e73aa77155ad4b2.tar.gz", + .hash = "1220b8a918dfcee4fc8326ec337776e2ffd3029511c35f6b96d10aa7be98ca2faf99", }, .zstd = .{ .url = "https://github.com/Syndica/zstd.zig/archive/a052e839a3dfc44feb00c2eb425815baa3c76e0d.tar.gz", .hash = "122001d56e43ef94e31243739ae83d7508abf0b8102795aff1ac91446e7ff450d875", }, .curl = .{ - .url = "https://github.com/jiacai2050/zig-curl/archive/7b1e1c6adb1daca48bbae6bd18fc1386dc6076ab.tar.gz", - .hash = "1220f2f863742c19fec9381537083da27519a7e638ce690973b34faf89f8f2b32729", + .url = "https://github.com/jiacai2050/zig-curl/archive/8a3f45798a80a5de4c11c6fa44dab8785c421d27.tar.gz", + .hash = "1220f70ac854b59315a8512861e039648d677feb4f9677bd873d6b9b7074a5906485", }, }, } From 3f4be430a3d8c2e836b3300f302341ff2fd27e04 Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Fri, 7 Jun 2024 18:46:02 +0200 Subject: [PATCH 2/6] Update .gitignore for new '.zig-cache' folder --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e4af46a26..078e84428 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -zig-cache/ +.zig-cache/ zig-out/ data/ @@ -11,4 +11,4 @@ index_storage/ /gossip-dumps -**/.DS_Store \ No newline at end of file +**/.DS_Store From d88a29397e1b7709fcf10778a5dd06accd918dd8 Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Fri, 7 Jun 2024 18:46:34 +0200 Subject: [PATCH 3/6] Upgrade to 0.13 stderr mutex API --- src/trace/log.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/trace/log.zig b/src/trace/log.zig index abe8df2b7..70c84118f 100644 --- a/src/trace/log.zig +++ b/src/trace/log.zig @@ -242,11 +242,10 @@ pub const StandardErrLogger = struct { pub const StdErrSink = struct { const Self = @This(); - pub fn consumeEntries(_: Self, entries: []*StandardEntry) void { + pub fn consumeEntries(_: Self, entries: []const *StandardEntry) void { const std_err_writer = std.io.getStdErr().writer(); - var std_err_mux = std.debug.getStderrMutex(); - std_err_mux.lock(); - defer std_err_mux.unlock(); + std.debug.lockStdErr(); + defer std.debug.unlockStdErr(); for (entries) |e| { logfmt.formatter(e, std_err_writer) catch unreachable; From fc7f52f2eff49246dcb79f442a06a21840bb6f2b Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Fri, 7 Jun 2024 19:51:20 +0200 Subject: [PATCH 4/6] Update zig-network dependency for 0.13 --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 388628836..a8def6d57 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -12,8 +12,8 @@ .hash = "1220995cd000a5d0f8595b119de29573769531c002fe3448a2c69fa6307bd1332620", }, .@"zig-network" = .{ - .url = "https://github.com/MasterQ32/zig-network/archive/2caffd712f57f29abb5e41a453cd1c2129517b05.tar.gz", - .hash = "122095b1af33a2fbe87af9365516e6c2d21f9f5a6725b539e03bcc6ed8df3c012f39", + .url = "https://github.com/ikskuh/zig-network/archive/d4506cd1950de8a6e6d3f28aed68a0b4f64e0b44.tar.gz", + .hash = "122080b2675fa7fdd7410af5f62942dec99e0ea766827c8c6506e6672b575fb0a50e", }, .@"zig-cli" = .{ .url = "https://github.com/sam701/zig-cli/archive/8c7a798c0f7fa0358d7ab41106fc872fca4cd995.tar.gz", From b045f977f707df427d2a40bb512ecd0e185c3ff3 Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Fri, 7 Jun 2024 22:06:47 +0200 Subject: [PATCH 5/6] Update base58-zig and switch over to our fork --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index a8def6d57..889441c54 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -8,8 +8,8 @@ }, .dependencies = .{ .@"base58-zig" = .{ - .url = "https://github.com/ultd/base58-zig/archive/7cec0723c99d713149ad4e875f888918d2687ca6.tar.gz", - .hash = "1220995cd000a5d0f8595b119de29573769531c002fe3448a2c69fa6307bd1332620", + .url = "https://github.com/Syndica/base58-zig/archive/e1001fbe8b41eed36d81e37931ada66b784e51dc.tar.gz", + .hash = "12206e5050a03cd9dcb896781de0cf541081488006532675371653f61d00c1f27433", }, .@"zig-network" = .{ .url = "https://github.com/ikskuh/zig-network/archive/d4506cd1950de8a6e6d3f28aed68a0b4f64e0b44.tar.gz", From 33c10841f0085318904671f925b25206e0d3f854 Mon Sep 17 00:00:00 2001 From: Trevor Berrange Sanchez Date: Mon, 10 Jun 2024 18:16:29 +0200 Subject: [PATCH 6/6] Use zig 0.13 in github CI/CD --- .github/workflows/check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6fe99fbed..11448fd55 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,7 +15,7 @@ jobs: - name: setup-zig uses: goto-bus-stop/setup-zig@v1 with: - version: 0.12.0 + version: 0.13.0 - name: lint run: | @@ -47,7 +47,7 @@ jobs: - name: setup-zig uses: goto-bus-stop/setup-zig@v1 with: - version: 0.12.0 + version: 0.13.0 - name: test run: zig build test @@ -65,7 +65,7 @@ jobs: - name: setup-zig uses: goto-bus-stop/setup-zig@v1 with: - version: 0.12.0 + version: 0.13.0 - name: benchmarks run: zig build -Doptimize=ReleaseSafe benchmark @@ -83,7 +83,7 @@ jobs: - name: setup-zig uses: goto-bus-stop/setup-zig@v1 with: - version: 0.12.0 + version: 0.13.0 - name: build release run: zig build -Doptimize=ReleaseSafe