From 574e49277a7e1bbe43152c0a462c6c8c72180a4f Mon Sep 17 00:00:00 2001 From: Rageoholic Date: Tue, 21 Jul 2020 08:11:42 -0500 Subject: [PATCH] Solve a sharing violation on windows On windows because we fail to close the output_file, when the compiler goes to open it when reading the file during compiling the actual app it encounters a sharing violation. This change closes the file, fixing that issue --- generator/vulkan/build-integration.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/vulkan/build-integration.zig b/generator/vulkan/build-integration.zig index 0075163..a5584d0 100644 --- a/generator/vulkan/build-integration.zig +++ b/generator/vulkan/build-integration.zig @@ -53,6 +53,7 @@ pub const GenerateStep = struct { const dir = path.dirname(self.full_out_path).?; try cwd.makePath(dir); const output_file = cwd.createFile(self.full_out_path, .{}) catch unreachable; + defer output_file.close(); _ = try std.zig.render(self.builder.allocator, output_file.outStream(), tree); } };