diff --git a/build.zig b/build.zig index a88c6d8b1..b39c2dd4b 100644 --- a/build.zig +++ b/build.zig @@ -6,7 +6,7 @@ const builtin = @import("builtin"); const zls_version: std.SemanticVersion = .{ .major = 0, .minor = 16, .patch = 0, .pre = "dev" }; /// Specify the minimum Zig version that is required to compile and test ZLS: -/// std.Build.Step.Run: Enable passing (generated) file content as args +/// Add error bundle support to `translate-c`, unify `cmdTranslateC` and `cImport` /// /// If you do not use Nix, a ZLS maintainer can take care of this. /// Whenever this version is increased, run the following command: @@ -15,7 +15,7 @@ const zls_version: std.SemanticVersion = .{ .major = 0, .minor = 16, .patch = 0, /// ``` /// /// Also update the `minimum_zig_version` in `build.zig.zon`. -const minimum_build_zig_version = "0.16.0-dev.313+be571f32c"; +const minimum_build_zig_version = "0.16.0-dev.722+c17e18647"; /// Specify the minimum Zig version that is usable with ZLS: /// Release 0.15.1 diff --git a/build.zig.zon b/build.zig.zon index e6ae766b6..55bddd48b 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -4,7 +4,7 @@ .version = "0.16.0-dev", // Must be kept in line with the `minimum_build_zig_version` in `build.zig`. // Should be a Zig version that is downloadable from https://ziglang.org/download/ or a mirror. - .minimum_zig_version = "0.16.0-dev.368+2a97e0af6", + .minimum_zig_version = "0.16.0-dev.728+87c18945c", // If you do not use Nix, a ZLS maintainer can take care of this. // Whenever the dependencies are updated, run the following command: // ```bash diff --git a/flake.lock b/flake.lock index 58298c1ac..7846823c0 100644 --- a/flake.lock +++ b/flake.lock @@ -56,11 +56,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758346548, - "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", + "lastModified": 1760139962, + "narHash": "sha256-4xggC56Rub3WInz5eD7EZWXuLXpNvJiUPahGtMkwtuc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", + "rev": "7e297ddff44a3cc93673bb38d0374df8d0ad73e4", "type": "github" }, "original": { @@ -101,11 +101,11 @@ ] }, "locked": { - "lastModified": 1758629597, - "narHash": "sha256-4dSjuHMYwTKXQMxw3nDiC6MgdUh0rCROJ6lHXcc3Vio=", + "lastModified": 1760401936, + "narHash": "sha256-/zj5GYO5PKhBWGzbHbqT+ehY8EghuABdQ2WGfCwZpCQ=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "f5b915caa89385d00ddba3e09e6f75951b2cd2c3", + "rev": "365085b6652259753b598d43b723858184980bbe", "type": "github" }, "original": { diff --git a/src/Server.zig b/src/Server.zig index 3608ce4ac..497ccb90c 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -1821,7 +1821,7 @@ fn processMessageReportError(server: *Server, arena_state: std.heap.ArenaAllocat } else |err| { log.err("failed to process {f}: {}", .{ fmtMessage(message), err }); if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace.*); + std.debug.dumpStackTrace(trace); } switch (message) { diff --git a/src/analysis.zig b/src/analysis.zig index e4a1ea22c..07558c1aa 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -5035,13 +5035,15 @@ pub fn getPositionContext( }, .l_bracket => try stack.append(allocator, .{ .ctx = .empty, .stack_id = .bracket }), .r_paren => { - _ = stack.pop(); + // Do this manually, as .pop() sets `stack.items[stack.items.len - 1]` to `undefined` which currently curr_ctx points to + if (stack.items.len != 0) stack.items.len -= 1; if (curr_ctx.stack_id != .paren) { (try peek(allocator, &stack)).ctx = .empty; } }, .r_bracket => { - _ = stack.pop(); + // Do this manually, as .pop() sets `stack.items[stack.items.len - 1]` to `undefined` which currently curr_ctx points to + if (stack.items.len != 0) stack.items.len -= 1; if (curr_ctx.stack_id != .bracket) { (try peek(allocator, &stack)).ctx = .empty; } diff --git a/tests/language_features/cimport.zig b/tests/language_features/cimport.zig index 08f3ff2e1..55c3af2fd 100644 --- a/tests/language_features/cimport.zig +++ b/tests/language_features/cimport.zig @@ -18,7 +18,6 @@ test "zig compile server - translate c" { defer result1.deinit(allocator); try std.testing.expect(result1 == .success); - if (true) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/25393 var result2 = try testTranslate( \\#include );