From e6996f5f66f69e2f9f88b91494d906baec5e792e Mon Sep 17 00:00:00 2001 From: nullptrdevs <16590917+nullptrdevs@users.noreply.github.com> Date: Thu, 18 May 2023 21:23:17 -0700 Subject: [PATCH] Update `config_gen` and data --- src/config_gen/config_gen.zig | 12 ++++++------ src/data/master.zig | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config_gen/config_gen.zig b/src/config_gen/config_gen.zig index 98768e6..be1b5d2 100644 --- a/src/config_gen/config_gen.zig +++ b/src/config_gen/config_gen.zig @@ -248,12 +248,12 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path: .type = "string", .@"enum" = &.{ "off", "messages", "verbose" }, .description = "Traces the communication between VS Code and the language server.", - .default = .{ .String = "off" }, + .default = .{ .string = "off" }, }); configuration.putAssumeCapacityNoClobber("zig.zls.checkForUpdate", .{ .type = "boolean", .description = "Whether to automatically check for new updates", - .default = .{ .Bool = true }, + .default = .{ .bool = true }, }); configuration.putAssumeCapacityNoClobber("zig.zls.path", .{ .type = "string", @@ -269,15 +269,15 @@ fn generateVSCodeConfigFile(allocator: std.mem.Allocator, config: Config, path: errdefer allocator.free(name); const default: ?std.json.Value = blk: { - if (option.@"enum" != null) break :blk .{ .String = option.default }; + if (option.@"enum" != null) break :blk .{ .string = option.default }; - var parser = std.json.Parser.init(allocator, false); + var parser = std.json.Parser.init(allocator, .alloc_always); defer parser.deinit(); var value = try parser.parse(option.default); defer value.deinit(); - break :blk if (value.root != .Null) value.root else null; + break :blk if (value.root != .null) value.root else null; }; configuration.putAssumeCapacityNoClobber(name, .{ @@ -1051,7 +1051,7 @@ pub fn main() !void { } const config = try std.json.parseFromSlice(Config, gpa, @embedFile("config.json"), .{}); - defer std.json.parseFree(Config, config, .{}); + defer std.json.parseFree(Config, gpa, config); try generateConfigFile(gpa, config, config_path); try generateSchemaFile(gpa, config, schema_path); diff --git a/src/data/master.zig b/src/data/master.zig index 944c386..b0e1036 100644 --- a/src/data/master.zig +++ b/src/data/master.zig @@ -1067,7 +1067,7 @@ pub const builtins = [_]Builtin{ \\ \\`dest` must be a mutable slice, a mutable pointer to an array, or a mutable many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type. \\ - \\Likewise, `source` must be a mutable slice, a mutable pointer to an array, or a mutable many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type. + \\`source` must be a slice, a pointer to an array, or a many-item [pointer](https://ziglang.org/documentation/master/#Pointers). It may have any alignment, and it may have any element type. \\ \\The `source` element type must support [Type Coercion](https://ziglang.org/documentation/master/#Type-Coercion) into the `dest` element type. The element types may have different ABI size, however, that may incur a performance penalty. \\