From 4b35e80f96f1b00be8ac3886399c49ce3af5239d Mon Sep 17 00:00:00 2001 From: FalsePattern <30945458+FalsePattern@users.noreply.github.com> Date: Sat, 17 Jun 2023 16:32:09 +0200 Subject: [PATCH 1/2] Replace deprecated calls std.math.min, std.math.max, std.math.inf_f32 Were removed from the standard library and no longer compile. --- src/analyser/InternPool.zig | 4 ++-- src/analysis.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/analyser/InternPool.zig b/src/analyser/InternPool.zig index ac3880e..ae08e1b 100644 --- a/src/analyser/InternPool.zig +++ b/src/analyser/InternPool.zig @@ -3023,8 +3023,8 @@ test "float value" { const f32_nan_value = try ip.get(gpa, .{ .float_32_value = std.math.nan_f32 }); const f32_qnan_value = try ip.get(gpa, .{ .float_32_value = std.math.qnan_f32 }); - const f32_inf_value = try ip.get(gpa, .{ .float_32_value = std.math.inf_f32 }); - const f32_ninf_value = try ip.get(gpa, .{ .float_32_value = -std.math.inf_f32 }); + const f32_inf_value = try ip.get(gpa, .{ .float_32_value = std.math.inf(f32) }); + const f32_ninf_value = try ip.get(gpa, .{ .float_32_value = -std.math.inf(f32) }); const f32_zero_value = try ip.get(gpa, .{ .float_32_value = 0.0 }); const f32_nzero_value = try ip.get(gpa, .{ .float_32_value = -0.0 }); diff --git a/src/analysis.zig b/src/analysis.zig index 85986fa..be70947 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -792,7 +792,7 @@ fn resolveTypeOfNodeUncached(analyser: *Analyser, node_handle: NodeWithHandle) e } // Bind type params to the arguments passed in the call. - const param_len = std.math.min(call.ast.params.len, expected_params); + const param_len = @min(call.ast.params.len, expected_params); var i: usize = 0; while (ast.nextFnParam(&it)) |decl_param| : (i += 1) { if (i >= param_len) break; From 8c0a3d4b105d46580872823e60007da9db070353 Mon Sep 17 00:00:00 2001 From: FalsePattern <30945458+FalsePattern@users.noreply.github.com> Date: Sat, 17 Jun 2023 19:52:17 +0200 Subject: [PATCH 2/2] Update diffz to latest-compatible version --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 6abcca1..d636105 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -12,8 +12,8 @@ .hash = "12204d32c44b494c0cbe553811dedfb7a73da37b13b492872dd4edc0340983072697", }, .diffz = .{ - .url = "https://github.com/ziglibs/diffz/archive/b966296b4489eb082b0831ec9a37d6f5e1906040.tar.gz", - .hash = "1220ed4aed884221108ad39f2658b69a91653e0bbc8ce429bc7f1bc4e58f6a751553", + .url = "https://github.com/ziglibs/diffz/archive/2fd03fc72760a700e41f30f2b180f26e11c3365b.tar.gz", + .hash = "1220de3226674f638ef4afcc919d121e06207a868cd163b24426b55d77c1048fc608", }, .binned_allocator = .{ .url = "https://gist.github.com/silversquirl/c1e4840048fdf48e669b6eac76d80634/archive/8bbe137e65f26854ff936046d884a45d4fa156de.tar.gz",