| author | |
| committer | |
| log | 3b77f1ed7e69e8347e41c2f93dfdfc22f5ac07dd |
| tree | 335b4dabfafa222eb5f94befbdb9211d74a7e5cb |
| parent | bdb3b382d8f39ec1e38a72c473963381a065da0c |
closes #200778 files changed, 33 insertions(+), 33 deletions(-)
lib/std/debug.zig+1-1| ... | @@ -1526,7 +1526,7 @@ test printLineFromFileAnyOs { | ... | @@ -1526,7 +1526,7 @@ test printLineFromFileAnyOs { |
| 1526 | var test_dir = std.testing.tmpDir(.{}); | 1526 | var test_dir = std.testing.tmpDir(.{}); |
| 1527 | defer test_dir.cleanup(); | 1527 | defer test_dir.cleanup(); |
| 1528 | // Relies on testing.tmpDir internals which is not ideal, but LineInfo requires paths. | 1528 | // Relies on testing.tmpDir internals which is not ideal, but LineInfo requires paths. |
| 1529 | const test_dir_path = try join(allocator, &.{ "zig-cache", "tmp", test_dir.sub_path[0..] }); | 1529 | const test_dir_path = try join(allocator, &.{ ".zig-cache", "tmp", test_dir.sub_path[0..] }); |
| 1530 | defer allocator.free(test_dir_path); | 1530 | defer allocator.free(test_dir_path); |
| 1531 | 1531 | ||
| 1532 | // Cases | 1532 | // Cases |
lib/std/fs/test.zig+5-5| ... | @@ -325,7 +325,7 @@ test "accessAbsolute" { | ... | @@ -325,7 +325,7 @@ test "accessAbsolute" { |
| 325 | const allocator = arena.allocator(); | 325 | const allocator = arena.allocator(); |
| 326 | 326 | ||
| 327 | const base_path = blk: { | 327 | const base_path = blk: { |
| 328 | const relative_path = try fs.path.join(allocator, &.{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 328 | const relative_path = try fs.path.join(allocator, &.{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 329 | break :blk try fs.realpathAlloc(allocator, relative_path); | 329 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 330 | }; | 330 | }; |
| 331 | 331 | ||
| ... | @@ -344,7 +344,7 @@ test "openDirAbsolute" { | ... | @@ -344,7 +344,7 @@ test "openDirAbsolute" { |
| 344 | const allocator = arena.allocator(); | 344 | const allocator = arena.allocator(); |
| 345 | 345 | ||
| 346 | const base_path = blk: { | 346 | const base_path = blk: { |
| 347 | const relative_path = try fs.path.join(allocator, &.{ "zig-cache", "tmp", tmp.sub_path[0..], "subdir" }); | 347 | const relative_path = try fs.path.join(allocator, &.{ ".zig-cache", "tmp", tmp.sub_path[0..], "subdir" }); |
| 348 | break :blk try fs.realpathAlloc(allocator, relative_path); | 348 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 349 | }; | 349 | }; |
| 350 | 350 | ||
| ... | @@ -407,7 +407,7 @@ test "readLinkAbsolute" { | ... | @@ -407,7 +407,7 @@ test "readLinkAbsolute" { |
| 407 | const allocator = arena.allocator(); | 407 | const allocator = arena.allocator(); |
| 408 | 408 | ||
| 409 | const base_path = blk: { | 409 | const base_path = blk: { |
| 410 | const relative_path = try fs.path.join(allocator, &.{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 410 | const relative_path = try fs.path.join(allocator, &.{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 411 | break :blk try fs.realpathAlloc(allocator, relative_path); | 411 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 412 | }; | 412 | }; |
| 413 | 413 | ||
| ... | @@ -990,7 +990,7 @@ test "renameAbsolute" { | ... | @@ -990,7 +990,7 @@ test "renameAbsolute" { |
| 990 | const allocator = arena.allocator(); | 990 | const allocator = arena.allocator(); |
| 991 | 991 | ||
| 992 | const base_path = blk: { | 992 | const base_path = blk: { |
| 993 | const relative_path = try fs.path.join(allocator, &.{ "zig-cache", "tmp", tmp_dir.sub_path[0..] }); | 993 | const relative_path = try fs.path.join(allocator, &.{ ".zig-cache", "tmp", tmp_dir.sub_path[0..] }); |
| 994 | break :blk try fs.realpathAlloc(allocator, relative_path); | 994 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 995 | }; | 995 | }; |
| 996 | 996 | ||
| ... | @@ -1772,7 +1772,7 @@ test "'.' and '..' in absolute functions" { | ... | @@ -1772,7 +1772,7 @@ test "'.' and '..' in absolute functions" { |
| 1772 | const allocator = arena.allocator(); | 1772 | const allocator = arena.allocator(); |
| 1773 | 1773 | ||
| 1774 | const base_path = blk: { | 1774 | const base_path = blk: { |
| 1775 | const relative_path = try fs.path.join(allocator, &.{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1775 | const relative_path = try fs.path.join(allocator, &.{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1776 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1776 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1777 | }; | 1777 | }; |
| 1778 | 1778 |
lib/std/posix/test.zig+7-7| ... | @@ -101,7 +101,7 @@ test "open smoke test" { | ... | @@ -101,7 +101,7 @@ test "open smoke test" { |
| 101 | const allocator = arena.allocator(); | 101 | const allocator = arena.allocator(); |
| 102 | 102 | ||
| 103 | const base_path = blk: { | 103 | const base_path = blk: { |
| 104 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 104 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 105 | break :blk try fs.realpathAlloc(allocator, relative_path); | 105 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| ... | @@ -1022,7 +1022,7 @@ test "rename smoke test" { | ... | @@ -1022,7 +1022,7 @@ test "rename smoke test" { |
| 1022 | const allocator = arena.allocator(); | 1022 | const allocator = arena.allocator(); |
| 1023 | 1023 | ||
| 1024 | const base_path = blk: { | 1024 | const base_path = blk: { |
| 1025 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1025 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1026 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1026 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1027 | }; | 1027 | }; |
| 1028 | 1028 | ||
| ... | @@ -1079,7 +1079,7 @@ test "access smoke test" { | ... | @@ -1079,7 +1079,7 @@ test "access smoke test" { |
| 1079 | const allocator = arena.allocator(); | 1079 | const allocator = arena.allocator(); |
| 1080 | 1080 | ||
| 1081 | const base_path = blk: { | 1081 | const base_path = blk: { |
| 1082 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1082 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1083 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1083 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1084 | }; | 1084 | }; |
| 1085 | 1085 | ||
| ... | @@ -1153,7 +1153,7 @@ test "read with empty buffer" { | ... | @@ -1153,7 +1153,7 @@ test "read with empty buffer" { |
| 1153 | 1153 | ||
| 1154 | // Get base abs path | 1154 | // Get base abs path |
| 1155 | const base_path = blk: { | 1155 | const base_path = blk: { |
| 1156 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1156 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1157 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1157 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1158 | }; | 1158 | }; |
| 1159 | 1159 | ||
| ... | @@ -1178,7 +1178,7 @@ test "pread with empty buffer" { | ... | @@ -1178,7 +1178,7 @@ test "pread with empty buffer" { |
| 1178 | 1178 | ||
| 1179 | // Get base abs path | 1179 | // Get base abs path |
| 1180 | const base_path = blk: { | 1180 | const base_path = blk: { |
| 1181 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1181 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1182 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1182 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1183 | }; | 1183 | }; |
| 1184 | 1184 | ||
| ... | @@ -1203,7 +1203,7 @@ test "write with empty buffer" { | ... | @@ -1203,7 +1203,7 @@ test "write with empty buffer" { |
| 1203 | 1203 | ||
| 1204 | // Get base abs path | 1204 | // Get base abs path |
| 1205 | const base_path = blk: { | 1205 | const base_path = blk: { |
| 1206 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1206 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1207 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1207 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1208 | }; | 1208 | }; |
| 1209 | 1209 | ||
| ... | @@ -1228,7 +1228,7 @@ test "pwrite with empty buffer" { | ... | @@ -1228,7 +1228,7 @@ test "pwrite with empty buffer" { |
| 1228 | 1228 | ||
| 1229 | // Get base abs path | 1229 | // Get base abs path |
| 1230 | const base_path = blk: { | 1230 | const base_path = blk: { |
| 1231 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ "zig-cache", "tmp", tmp.sub_path[0..] }); | 1231 | const relative_path = try fs.path.join(allocator, &[_][]const u8{ ".zig-cache", "tmp", tmp.sub_path[0..] }); |
| 1232 | break :blk try fs.realpathAlloc(allocator, relative_path); | 1232 | break :blk try fs.realpathAlloc(allocator, relative_path); |
| 1233 | }; | 1233 | }; |
| 1234 | 1234 |
lib/std/testing.zig+3-3| ... | @@ -563,11 +563,11 @@ pub fn tmpDir(opts: std.fs.Dir.OpenDirOptions) TmpDir { | ... | @@ -563,11 +563,11 @@ pub fn tmpDir(opts: std.fs.Dir.OpenDirOptions) TmpDir { |
| 563 | _ = std.fs.base64_encoder.encode(&sub_path, &random_bytes); | 563 | _ = std.fs.base64_encoder.encode(&sub_path, &random_bytes); |
| 564 | 564 | ||
| 565 | const cwd = std.fs.cwd(); | 565 | const cwd = std.fs.cwd(); |
| 566 | var cache_dir = cwd.makeOpenPath("zig-cache", .{}) catch | 566 | var cache_dir = cwd.makeOpenPath(".zig-cache", .{}) catch |
| 567 | @panic("unable to make tmp dir for testing: unable to make and open zig-cache dir"); | 567 | @panic("unable to make tmp dir for testing: unable to make and open .zig-cache dir"); |
| 568 | defer cache_dir.close(); | 568 | defer cache_dir.close(); |
| 569 | const parent_dir = cache_dir.makeOpenPath("tmp", .{}) catch | 569 | const parent_dir = cache_dir.makeOpenPath("tmp", .{}) catch |
| 570 | @panic("unable to make tmp dir for testing: unable to make and open zig-cache/tmp dir"); | 570 | @panic("unable to make tmp dir for testing: unable to make and open .zig-cache/tmp dir"); |
| 571 | const dir = parent_dir.makeOpenPath(&sub_path, opts) catch | 571 | const dir = parent_dir.makeOpenPath(&sub_path, opts) catch |
| 572 | @panic("unable to make tmp dir for testing: unable to make and open the tmp dir"); | 572 | @panic("unable to make tmp dir for testing: unable to make and open the tmp dir"); |
| 573 | 573 |
src/Package/Fetch.zig+6-6| ... | @@ -2000,7 +2000,7 @@ test "zip" { | ... | @@ -2000,7 +2000,7 @@ test "zip" { |
| 2000 | try bw.flush(); | 2000 | try bw.flush(); |
| 2001 | } | 2001 | } |
| 2002 | 2002 | ||
| 2003 | const zip_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/test.zip", .{tmp.sub_path}); | 2003 | const zip_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/test.zip", .{tmp.sub_path}); |
| 2004 | defer gpa.free(zip_path); | 2004 | defer gpa.free(zip_path); |
| 2005 | 2005 | ||
| 2006 | var fb: TestFetchBuilder = undefined; | 2006 | var fb: TestFetchBuilder = undefined; |
| ... | @@ -2033,7 +2033,7 @@ test "zip with one root folder" { | ... | @@ -2033,7 +2033,7 @@ test "zip with one root folder" { |
| 2033 | try bw.flush(); | 2033 | try bw.flush(); |
| 2034 | } | 2034 | } |
| 2035 | 2035 | ||
| 2036 | const zip_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/test.zip", .{tmp.sub_path}); | 2036 | const zip_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/test.zip", .{tmp.sub_path}); |
| 2037 | defer gpa.free(zip_path); | 2037 | defer gpa.free(zip_path); |
| 2038 | 2038 | ||
| 2039 | var fb: TestFetchBuilder = undefined; | 2039 | var fb: TestFetchBuilder = undefined; |
| ... | @@ -2069,7 +2069,7 @@ test "tarball with duplicate paths" { | ... | @@ -2069,7 +2069,7 @@ test "tarball with duplicate paths" { |
| 2069 | 2069 | ||
| 2070 | const tarball_name = "duplicate_paths.tar.gz"; | 2070 | const tarball_name = "duplicate_paths.tar.gz"; |
| 2071 | try saveEmbedFile(tarball_name, tmp.dir); | 2071 | try saveEmbedFile(tarball_name, tmp.dir); |
| 2072 | const tarball_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); | 2072 | const tarball_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); |
| 2073 | defer gpa.free(tarball_path); | 2073 | defer gpa.free(tarball_path); |
| 2074 | 2074 | ||
| 2075 | // Run tarball fetch, expect to fail | 2075 | // Run tarball fetch, expect to fail |
| ... | @@ -2101,7 +2101,7 @@ test "tarball with excluded duplicate paths" { | ... | @@ -2101,7 +2101,7 @@ test "tarball with excluded duplicate paths" { |
| 2101 | 2101 | ||
| 2102 | const tarball_name = "duplicate_paths_excluded.tar.gz"; | 2102 | const tarball_name = "duplicate_paths_excluded.tar.gz"; |
| 2103 | try saveEmbedFile(tarball_name, tmp.dir); | 2103 | try saveEmbedFile(tarball_name, tmp.dir); |
| 2104 | const tarball_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); | 2104 | const tarball_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); |
| 2105 | defer gpa.free(tarball_path); | 2105 | defer gpa.free(tarball_path); |
| 2106 | 2106 | ||
| 2107 | // Run tarball fetch, should succeed | 2107 | // Run tarball fetch, should succeed |
| ... | @@ -2145,7 +2145,7 @@ test "tarball without root folder" { | ... | @@ -2145,7 +2145,7 @@ test "tarball without root folder" { |
| 2145 | 2145 | ||
| 2146 | const tarball_name = "no_root.tar.gz"; | 2146 | const tarball_name = "no_root.tar.gz"; |
| 2147 | try saveEmbedFile(tarball_name, tmp.dir); | 2147 | try saveEmbedFile(tarball_name, tmp.dir); |
| 2148 | const tarball_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); | 2148 | const tarball_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); |
| 2149 | defer gpa.free(tarball_path); | 2149 | defer gpa.free(tarball_path); |
| 2150 | 2150 | ||
| 2151 | // Run tarball fetch, should succeed | 2151 | // Run tarball fetch, should succeed |
| ... | @@ -2176,7 +2176,7 @@ test "set executable bit based on file content" { | ... | @@ -2176,7 +2176,7 @@ test "set executable bit based on file content" { |
| 2176 | 2176 | ||
| 2177 | const tarball_name = "executables.tar.gz"; | 2177 | const tarball_name = "executables.tar.gz"; |
| 2178 | try saveEmbedFile(tarball_name, tmp.dir); | 2178 | try saveEmbedFile(tarball_name, tmp.dir); |
| 2179 | const tarball_path = try std.fmt.allocPrint(gpa, "zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); | 2179 | const tarball_path = try std.fmt.allocPrint(gpa, ".zig-cache/tmp/{s}/{s}", .{ tmp.sub_path, tarball_name }); |
| 2180 | defer gpa.free(tarball_path); | 2180 | defer gpa.free(tarball_path); |
| 2181 | 2181 | ||
| 2182 | // $ tar -tvf executables.tar.gz | 2182 | // $ tar -tvf executables.tar.gz |
src/main.zig+4-4| ... | @@ -123,6 +123,7 @@ const debug_usage = normal_usage ++ | ... | @@ -123,6 +123,7 @@ const debug_usage = normal_usage ++ |
| 123 | ; | 123 | ; |
| 124 | 124 | ||
| 125 | const usage = if (build_options.enable_debug_extensions) debug_usage else normal_usage; | 125 | const usage = if (build_options.enable_debug_extensions) debug_usage else normal_usage; |
| 126 | const default_local_zig_cache_basename = ".zig-cache"; | ||
| 126 | 127 | ||
| 127 | var log_scopes: std.ArrayListUnmanaged([]const u8) = .{}; | 128 | var log_scopes: std.ArrayListUnmanaged([]const u8) = .{}; |
| 128 | 129 | ||
| ... | @@ -3107,14 +3108,13 @@ fn buildOutputType( | ... | @@ -3107,14 +3108,13 @@ fn buildOutputType( |
| 3107 | 3108 | ||
| 3108 | // search upwards from cwd until we find directory with build.zig | 3109 | // search upwards from cwd until we find directory with build.zig |
| 3109 | const cwd_path = try process.getCwdAlloc(arena); | 3110 | const cwd_path = try process.getCwdAlloc(arena); |
| 3110 | const zig_cache = "zig-cache"; | ||
| 3111 | var dirname: []const u8 = cwd_path; | 3111 | var dirname: []const u8 = cwd_path; |
| 3112 | while (true) { | 3112 | while (true) { |
| 3113 | const joined_path = try fs.path.join(arena, &.{ | 3113 | const joined_path = try fs.path.join(arena, &.{ |
| 3114 | dirname, Package.build_zig_basename, | 3114 | dirname, Package.build_zig_basename, |
| 3115 | }); | 3115 | }); |
| 3116 | if (fs.cwd().access(joined_path, .{})) |_| { | 3116 | if (fs.cwd().access(joined_path, .{})) |_| { |
| 3117 | const cache_dir_path = try fs.path.join(arena, &.{ dirname, zig_cache }); | 3117 | const cache_dir_path = try fs.path.join(arena, &.{ dirname, default_local_zig_cache_basename }); |
| 3118 | const dir = try fs.cwd().makeOpenPath(cache_dir_path, .{}); | 3118 | const dir = try fs.cwd().makeOpenPath(cache_dir_path, .{}); |
| 3119 | cleanup_local_cache_dir = dir; | 3119 | cleanup_local_cache_dir = dir; |
| 3120 | break :l .{ .handle = dir, .path = cache_dir_path }; | 3120 | break :l .{ .handle = dir, .path = cache_dir_path }; |
| ... | @@ -4869,9 +4869,9 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { | ... | @@ -4869,9 +4869,9 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 4869 | .path = local_cache_dir_path, | 4869 | .path = local_cache_dir_path, |
| 4870 | }; | 4870 | }; |
| 4871 | } | 4871 | } |
| 4872 | const cache_dir_path = try build_root.directory.join(arena, &[_][]const u8{"zig-cache"}); | 4872 | const cache_dir_path = try build_root.directory.join(arena, &.{default_local_zig_cache_basename}); |
| 4873 | break :l .{ | 4873 | break :l .{ |
| 4874 | .handle = try build_root.directory.handle.makeOpenPath("zig-cache", .{}), | 4874 | .handle = try build_root.directory.handle.makeOpenPath(default_local_zig_cache_basename, .{}), |
| 4875 | .path = cache_dir_path, | 4875 | .path = cache_dir_path, |
| 4876 | }; | 4876 | }; |
| 4877 | }; | 4877 | }; |
test/src/Cases.zig+6-6| ... | @@ -1449,14 +1449,14 @@ fn runCases(self: *Cases, zig_exe_path: []const u8) !void { | ... | @@ -1449,14 +1449,14 @@ fn runCases(self: *Cases, zig_exe_path: []const u8) !void { |
| 1449 | var global_tmp = std.testing.tmpDir(.{}); | 1449 | var global_tmp = std.testing.tmpDir(.{}); |
| 1450 | defer global_tmp.cleanup(); | 1450 | defer global_tmp.cleanup(); |
| 1451 | 1451 | ||
| 1452 | var cache_dir = try global_tmp.dir.makeOpenPath("zig-cache", .{}); | 1452 | var cache_dir = try global_tmp.dir.makeOpenPath(".zig-cache", .{}); |
| 1453 | defer cache_dir.close(); | 1453 | defer cache_dir.close(); |
| 1454 | const tmp_dir_path = try std.fs.path.join(self.gpa, &[_][]const u8{ ".", "zig-cache", "tmp", &global_tmp.sub_path }); | 1454 | const tmp_dir_path = try std.fs.path.join(self.gpa, &[_][]const u8{ ".", ".zig-cache", "tmp", &global_tmp.sub_path }); |
| 1455 | defer self.gpa.free(tmp_dir_path); | 1455 | defer self.gpa.free(tmp_dir_path); |
| 1456 | 1456 | ||
| 1457 | const global_cache_directory: Compilation.Directory = .{ | 1457 | const global_cache_directory: Compilation.Directory = .{ |
| 1458 | .handle = cache_dir, | 1458 | .handle = cache_dir, |
| 1459 | .path = try std.fs.path.join(self.gpa, &[_][]const u8{ tmp_dir_path, "zig-cache" }), | 1459 | .path = try std.fs.path.join(self.gpa, &[_][]const u8{ tmp_dir_path, ".zig-cache" }), |
| 1460 | }; | 1460 | }; |
| 1461 | defer self.gpa.free(global_cache_directory.path.?); | 1461 | defer self.gpa.free(global_cache_directory.path.?); |
| 1462 | 1462 | ||
| ... | @@ -1529,16 +1529,16 @@ fn runOneCase( | ... | @@ -1529,16 +1529,16 @@ fn runOneCase( |
| 1529 | var tmp = std.testing.tmpDir(.{}); | 1529 | var tmp = std.testing.tmpDir(.{}); |
| 1530 | defer tmp.cleanup(); | 1530 | defer tmp.cleanup(); |
| 1531 | 1531 | ||
| 1532 | var cache_dir = try tmp.dir.makeOpenPath("zig-cache", .{}); | 1532 | var cache_dir = try tmp.dir.makeOpenPath(".zig-cache", .{}); |
| 1533 | defer cache_dir.close(); | 1533 | defer cache_dir.close(); |
| 1534 | 1534 | ||
| 1535 | const tmp_dir_path = try std.fs.path.join( | 1535 | const tmp_dir_path = try std.fs.path.join( |
| 1536 | arena, | 1536 | arena, |
| 1537 | &[_][]const u8{ ".", "zig-cache", "tmp", &tmp.sub_path }, | 1537 | &[_][]const u8{ ".", ".zig-cache", "tmp", &tmp.sub_path }, |
| 1538 | ); | 1538 | ); |
| 1539 | const local_cache_path = try std.fs.path.join( | 1539 | const local_cache_path = try std.fs.path.join( |
| 1540 | arena, | 1540 | arena, |
| 1541 | &[_][]const u8{ tmp_dir_path, "zig-cache" }, | 1541 | &[_][]const u8{ tmp_dir_path, ".zig-cache" }, |
| 1542 | ); | 1542 | ); |
| 1543 | 1543 | ||
| 1544 | const zig_cache_directory: Compilation.Directory = .{ | 1544 | const zig_cache_directory: Compilation.Directory = .{ |
tools/doctest.zig+1-1| ... | @@ -22,7 +22,7 @@ const usage = | ... | @@ -22,7 +22,7 @@ const usage = |
| 22 | \\ -o output Where to write output HTML docs to | 22 | \\ -o output Where to write output HTML docs to |
| 23 | \\ --zig zig Path to the zig compiler | 23 | \\ --zig zig Path to the zig compiler |
| 24 | \\ --zig-lib-dir dir Override the zig compiler library path | 24 | \\ --zig-lib-dir dir Override the zig compiler library path |
| 25 | \\ --cache-root dir Path to local zig-cache/ | 25 | \\ --cache-root dir Path to local .zig-cache/ |
| 26 | \\ | 26 | \\ |
| 27 | ; | 27 | ; |
| 28 | 28 |