Skip to content

Conversation

@DialecticalMaterialist
Copy link

@xdBronch
Copy link
Contributor

should probably update for ziglang/zig#24826 as well

@kcbanner
Copy link
Contributor

kcbanner commented Aug 14, 2025

diff --git a/src/features/diagnostics.zig b/src/features/diagnostics.zig
index 35d4489e..79d91051 100644
--- a/src/features/diagnostics.zig
+++ b/src/features/diagnostics.zig
@@ -112,7 +112,7 @@ fn collectParseDiagnostics(tree: Ast, eb: *std.zig.ErrorBundle.Wip) error{OutOfM
         aw.clearRetainingCapacity();
         tree.renderError(err, &aw.writer) catch return error.OutOfMemory;
         try notes.append(allocator, try eb.addErrorMessage(.{
-            .msg = try eb.addString(aw.getWritten()),
+            .msg = try eb.addString(aw.written()),
             .src_loc = try errorBundleSourceLocationFromToken(tree, eb, err.token),
         }));
     }
@@ -120,7 +120,7 @@ fn collectParseDiagnostics(tree: Ast, eb: *std.zig.ErrorBundle.Wip) error{OutOfM
     aw.clearRetainingCapacity();
     tree.renderError(current_error, &aw.writer) catch return error.OutOfMemory;
     try eb.addRootErrorMessage(.{
-        .msg = try eb.addString(aw.getWritten()),
+        .msg = try eb.addString(aw.written()),
         .src_loc = try errorBundleSourceLocationFromToken(tree, eb, current_error.token),
         .notes_len = @intCast(notes.items.len),
     });
diff --git a/src/print_ast.zig b/src/print_ast.zig
index b6e8e9c5..8357ebb1 100644
--- a/src/print_ast.zig
+++ b/src/print_ast.zig
@@ -913,7 +913,7 @@ test PrintAst {
         \\    }, // :2:5
         \\};
         \\
-    , aw.getWritten());
+    , aw.written());
 
     // The output itself is syntactically valid Zig code.
 
diff --git a/src/tools/config_gen.zig b/src/tools/config_gen.zig
index 355bc342..08c1a8b7 100644
--- a/src/tools/config_gen.zig
+++ b/src/tools/config_gen.zig
@@ -951,7 +951,7 @@ fn generateVersionDataFile(allocator: std.mem.Allocator, version: []const u8, ou
         writeMarkdownFromHtml(html, &markdown.writer) catch return error.OutOfMemory;
 
         try writer.writeAll("            .documentation =\n");
-        var line_it = std.mem.splitScalar(u8, std.mem.trim(u8, markdown.getWritten(), "\n"), '\n');
+        var line_it = std.mem.splitScalar(u8, std.mem.trim(u8, markdown.written(), "\n"), '\n');
         while (line_it.next()) |line| {
             try writer.print("            \\\\{s}\n", .{std.mem.trimRight(u8, line, " ")});
         }
diff --git a/tests/build_runner_check.zig b/tests/build_runner_check.zig
index 26eaa94d..305b1b8f 100644
--- a/tests/build_runner_check.zig
+++ b/tests/build_runner_check.zig
@@ -31,7 +31,7 @@ pub fn main() !u8 {
         try std.json.Stringify.encodeJsonStringChars(&.{std.fs.path.sep}, .{}, &aw.writer);
 
         // The build runner will produce absolute paths in the output so we remove them here.
-        const actual = try std.mem.replaceOwned(u8, gpa, actual_unsanitized, aw.getWritten(), "");
+        const actual = try std.mem.replaceOwned(u8, gpa, actual_unsanitized, aw.written(), "");
 
         // We also convert windows style '\\' path separators to posix style '/'.
         switch (std.fs.path.sep) {

Here is a patch you can apply for the getWritten -> written change.

@Techatrix
Copy link
Member

There are some changes that would need to be made to get this PR merged. To avoid any further delays in review, I am going to do this fix myself. Thank you for the effort nonetheless.

@Techatrix Techatrix closed this Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants