Rename Dir.writeFile2 -> Dir.writeFile and update all callsites

writeFile was deprecated in favor of writeFile2 in f645022d16. This commit renames writeFile2 to writeFile and makes writeFile2 a compile error.
This commit is contained in:
Ryan Liptak
2024-05-02 20:54:48 -07:00
committed by Andrew Kelley
parent a52f12afc9
commit b86c4bde64
23 changed files with 83 additions and 82 deletions

View File

@@ -218,7 +218,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
}
switch (output_source_file.contents) {
.bytes => |bytes| {
b.build_root.handle.writeFile(output_source_file.sub_path, bytes) catch |err| {
b.build_root.handle.writeFile(.{ .sub_path = output_source_file.sub_path, .data = bytes }) catch |err| {
return step.fail("unable to write file '{}{s}': {s}", .{
b.build_root, output_source_file.sub_path, @errorName(err),
});
@@ -311,7 +311,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
}
switch (file.contents) {
.bytes => |bytes| {
cache_dir.writeFile(file.sub_path, bytes) catch |err| {
cache_dir.writeFile(.{ .sub_path = file.sub_path, .data = bytes }) catch |err| {
return step.fail("unable to write file '{}{s}{c}{s}': {s}", .{
b.cache_root, cache_path, fs.path.sep, file.sub_path, @errorName(err),
});