authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-24 00:11:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-29 23:50:19-07:00
logd5c1e6332724b9cbd692ef38ff329b6814ed63b9
tree8cd2e43f2d2d760f5ce0fada91a8612344f69f37
parentb384a7f85859678657f0ee91041be27078dfd346

compiler: fix references to Compilation.Directories


4 files changed, 9 insertions(+), 9 deletions(-)

src/Compilation.zig+4-4
...@@ -490,7 +490,7 @@ pub const Path = struct {...@@ -490,7 +490,7 @@ pub const Path = struct {
490490
491 /// From an unresolved path (which can be made of multiple not-yet-joined strings), construct a491 /// From an unresolved path (which can be made of multiple not-yet-joined strings), construct a
492 /// canonical `Path`.492 /// canonical `Path`.
493 pub fn fromUnresolved(gpa: Allocator, dirs: Compilation.Directories, unresolved_parts: []const []const u8) Allocator.Error!Path {493 pub fn fromUnresolved(gpa: Allocator, dirs: std.zig.Directories, unresolved_parts: []const []const u8) Allocator.Error!Path {
494 const resolved = try std.zig.resolvePath(gpa, dirs.cwd, unresolved_parts);494 const resolved = try std.zig.resolvePath(gpa, dirs.cwd, unresolved_parts);
495 errdefer gpa.free(resolved);495 errdefer gpa.free(resolved);
496496
...@@ -565,7 +565,7 @@ pub const Path = struct {...@@ -565,7 +565,7 @@ pub const Path = struct {
565 /// `.global_cache` could still end up returning a `Path` with `Path.root == .zig_lib`.565 /// `.global_cache` could still end up returning a `Path` with `Path.root == .zig_lib`.
566 pub fn fromRoot(566 pub fn fromRoot(
567 gpa: Allocator,567 gpa: Allocator,
568 dirs: Compilation.Directories,568 dirs: std.zig.Directories,
569 root: Path.Root,569 root: Path.Root,
570 sub_path: []const u8,570 sub_path: []const u8,
571 ) Allocator.Error!Path {571 ) Allocator.Error!Path {
...@@ -588,7 +588,7 @@ pub const Path = struct {...@@ -588,7 +588,7 @@ pub const Path = struct {
588 pub fn join(588 pub fn join(
589 p: Path,589 p: Path,
590 gpa: Allocator,590 gpa: Allocator,
591 dirs: Compilation.Directories,591 dirs: std.zig.Directories,
592 sub_path: []const u8,592 sub_path: []const u8,
593 ) Allocator.Error!Path {593 ) Allocator.Error!Path {
594 // Currently, this just wraps `fromUnresolved` for simplicity. A more efficient impl is594 // Currently, this just wraps `fromUnresolved` for simplicity. A more efficient impl is
...@@ -609,7 +609,7 @@ pub const Path = struct {...@@ -609,7 +609,7 @@ pub const Path = struct {
609 pub fn upJoin(609 pub fn upJoin(
610 p: Path,610 p: Path,
611 gpa: Allocator,611 gpa: Allocator,
612 dirs: Compilation.Directories,612 dirs: std.zig.Directories,
613 sub_path: []const u8,613 sub_path: []const u8,
614 ) Allocator.Error!Path {614 ) Allocator.Error!Path {
615 return .fromUnresolved(gpa, dirs, &.{615 return .fromUnresolved(gpa, dirs, &.{
src/Module.zig+1-1
...@@ -457,7 +457,7 @@ pub fn createLimited(gpa: Allocator, options: LimitedOptions) Allocator.Error!*M...@@ -457,7 +457,7 @@ pub fn createLimited(gpa: Allocator, options: LimitedOptions) Allocator.Error!*M
457}457}
458458
459/// Does not ensure that the module's root directory exists on-disk; see `Builtin.updateFileOnDisk` for that task.459/// Does not ensure that the module's root directory exists on-disk; see `Builtin.updateFileOnDisk` for that task.
460pub fn createBuiltin(arena: Allocator, opts: Builtin, dirs: Compilation.Directories) Allocator.Error!*Module {460pub fn createBuiltin(arena: Allocator, opts: Builtin, dirs: std.zig.Directories) Allocator.Error!*Module {
461 const sub_path = "b" ++ std.fs.path.sep_str ++ Cache.binToHex(opts.hash());461 const sub_path = "b" ++ std.fs.path.sep_str ++ Cache.binToHex(opts.hash());
462 const new = try arena.create(Module);462 const new = try arena.create(Module);
463 new.* = .{463 new.* = .{
src/main.zig+3-3
...@@ -3218,7 +3218,7 @@ fn buildOutputType(...@@ -3218,7 +3218,7 @@ fn buildOutputType(
3218 const cwd_path = try std.zig.getResolvedCwd(io, arena);3218 const cwd_path = try std.zig.getResolvedCwd(io, arena);
32193219
3220 // This `init` calls `fatal` on error.3220 // This `init` calls `fatal` on error.
3221 var dirs: Compilation.Directories = .init(3221 var dirs: std.zig.Directories = .init(
3222 arena,3222 arena,
3223 io,3223 io,
3224 override_lib_dir,3224 override_lib_dir,
...@@ -3928,7 +3928,7 @@ fn buildOutputType(...@@ -3928,7 +3928,7 @@ fn buildOutputType(
3928}3928}
39293929
3930const CreateModule = struct {3930const CreateModule = struct {
3931 dirs: Compilation.Directories,3931 dirs: std.zig.Directories,
3932 modules: std.array_hash_map.String(CliModule),3932 modules: std.array_hash_map.String(CliModule),
3933 opts: Compilation.Config.Options,3933 opts: Compilation.Config.Options,
3934 object_format: ?[]const u8,3934 object_format: ?[]const u8,
...@@ -4939,7 +4939,7 @@ fn jitCmdInner(...@@ -4939,7 +4939,7 @@ fn jitCmdInner(
4939 const cwd_path = try std.zig.getResolvedCwd(io, arena);4939 const cwd_path = try std.zig.getResolvedCwd(io, arena);
49404940
4941 // This `init` calls `fatal` on error.4941 // This `init` calls `fatal` on error.
4942 var dirs: Compilation.Directories = .init(4942 var dirs: std.zig.Directories = .init(
4943 arena,4943 arena,
4944 io,4944 io,
4945 override_lib_dir,4945 override_lib_dir,
src/print_env.zig+1-1
...@@ -30,7 +30,7 @@ pub fn cmdEnv(...@@ -30,7 +30,7 @@ pub fn cmdEnv(
3030
31 const cwd_path = try std.zig.getResolvedCwd(io, arena);31 const cwd_path = try std.zig.getResolvedCwd(io, arena);
3232
33 var dirs: Compilation.Directories = .init(33 var dirs: std.zig.Directories = .init(
34 arena,34 arena,
35 io,35 io,
36 override_lib_dir,36 override_lib_dir,