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 {
490490
491491 /// From an unresolved path (which can be made of multiple not-yet-joined strings), construct a
492492 /// 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 {
494494 const resolved = try std.zig.resolvePath(gpa, dirs.cwd, unresolved_parts);
495495 errdefer gpa.free(resolved);
496496
......@@ -565,7 +565,7 @@ pub const Path = struct {
565565 /// `.global_cache` could still end up returning a `Path` with `Path.root == .zig_lib`.
566566 pub fn fromRoot(
567567 gpa: Allocator,
568 dirs: Compilation.Directories,
568 dirs: std.zig.Directories,
569569 root: Path.Root,
570570 sub_path: []const u8,
571571 ) Allocator.Error!Path {
......@@ -588,7 +588,7 @@ pub const Path = struct {
588588 pub fn join(
589589 p: Path,
590590 gpa: Allocator,
591 dirs: Compilation.Directories,
591 dirs: std.zig.Directories,
592592 sub_path: []const u8,
593593 ) Allocator.Error!Path {
594594 // Currently, this just wraps `fromUnresolved` for simplicity. A more efficient impl is
......@@ -609,7 +609,7 @@ pub const Path = struct {
609609 pub fn upJoin(
610610 p: Path,
611611 gpa: Allocator,
612 dirs: Compilation.Directories,
612 dirs: std.zig.Directories,
613613 sub_path: []const u8,
614614 ) Allocator.Error!Path {
615615 return .fromUnresolved(gpa, dirs, &.{
src/Module.zig+1-1
......@@ -457,7 +457,7 @@ pub fn createLimited(gpa: Allocator, options: LimitedOptions) Allocator.Error!*M
457457}
458458
459459/// 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 {
461461 const sub_path = "b" ++ std.fs.path.sep_str ++ Cache.binToHex(opts.hash());
462462 const new = try arena.create(Module);
463463 new.* = .{
src/main.zig+3-3
......@@ -3218,7 +3218,7 @@ fn buildOutputType(
32183218 const cwd_path = try std.zig.getResolvedCwd(io, arena);
32193219
32203220 // This `init` calls `fatal` on error.
3221 var dirs: Compilation.Directories = .init(
3221 var dirs: std.zig.Directories = .init(
32223222 arena,
32233223 io,
32243224 override_lib_dir,
......@@ -3928,7 +3928,7 @@ fn buildOutputType(
39283928}
39293929
39303930const CreateModule = struct {
3931 dirs: Compilation.Directories,
3931 dirs: std.zig.Directories,
39323932 modules: std.array_hash_map.String(CliModule),
39333933 opts: Compilation.Config.Options,
39343934 object_format: ?[]const u8,
......@@ -4939,7 +4939,7 @@ fn jitCmdInner(
49394939 const cwd_path = try std.zig.getResolvedCwd(io, arena);
49404940
49414941 // This `init` calls `fatal` on error.
4942 var dirs: Compilation.Directories = .init(
4942 var dirs: std.zig.Directories = .init(
49434943 arena,
49444944 io,
49454945 override_lib_dir,
src/print_env.zig+1-1
......@@ -30,7 +30,7 @@ pub fn cmdEnv(
3030
3131 const cwd_path = try std.zig.getResolvedCwd(io, arena);
3232
33 var dirs: Compilation.Directories = .init(
33 var dirs: std.zig.Directories = .init(
3434 arena,
3535 io,
3636 override_lib_dir,