fix legacy json in tests

This commit is contained in:
FalsePattern 2023-06-21 17:47:58 +02:00
parent 7fede4a9e2
commit 71b09a3ffe
No known key found for this signature in database
GPG Key ID: FDF7126A9E124447
3 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,7 @@ pub const goto = @import("features/goto.zig");
pub const hover_handler = @import("features/hover.zig");
pub const selection_range = @import("features/selection_range.zig");
pub const diagnostics = @import("features/diagnostics.zig");
pub const legacy_json = @import("legacy_json.zig");
comptime {
const std = @import("std");

View File

@ -60,7 +60,7 @@ pub const Context = struct {
}
pub fn deinit(self: *Context) void {
@import("../src/legacy_json.zig").parseFree(Config, allocator, self.config.*);
zls.legacy_json.parseFree(Config, allocator, self.config.*);
allocator.destroy(self.config);
self.request("shutdown", "{}", null) catch {};

View File

@ -108,7 +108,7 @@ fn testTranslate(c_source: []const u8) !translate_c.Result {
if (!std.process.can_spawn) return error.SkipZigTest;
var config: zls.Config = .{};
defer @import("../../src/legacy_json.zig").parseFree(zls.Config, allocator, config);
defer zls.legacy_json.parseFree(zls.Config, allocator, config);
var runtime_zig_version: ?zls.ZigVersionWrapper = null;
defer if (runtime_zig_version) |*v| v.free();