diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-03-21 16:16:47 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-03-21 16:16:47 -0700 |
| commit | 7bc0b74b6d57ff1a350a4f430f7d9e799a90edd0 (patch) | |
| tree | 5e251595d497f7eacd44673ecf61370f28d0c3cc /src/Package | |
| parent | 8778dc4bb2bb20779bee3fc964f79437ff3ef9fe (diff) | |
| download | zig-7bc0b74b6d57ff1a350a4f430f7d9e799a90edd0.tar.gz zig-7bc0b74b6d57ff1a350a4f430f7d9e799a90edd0.zip | |
move Package.Path to std.Build.Cache.Path
Diffstat (limited to 'src/Package')
| -rw-r--r-- | src/Package/Fetch.zig | 12 | ||||
| -rw-r--r-- | src/Package/Module.zig | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/Package/Fetch.zig b/src/Package/Fetch.zig index a40bb539f7..d0cfd5ab94 100644 --- a/src/Package/Fetch.zig +++ b/src/Package/Fetch.zig @@ -33,7 +33,7 @@ location_tok: std.zig.Ast.TokenIndex, hash_tok: std.zig.Ast.TokenIndex, name_tok: std.zig.Ast.TokenIndex, lazy_status: LazyStatus, -parent_package_root: Package.Path, +parent_package_root: Cache.Path, parent_manifest_ast: ?*const std.zig.Ast, prog_node: *std.Progress.Node, job_queue: *JobQueue, @@ -50,7 +50,7 @@ allow_missing_paths_field: bool, /// This will either be relative to `global_cache`, or to the build root of /// the root package. -package_root: Package.Path, +package_root: Cache.Path, error_bundle: ErrorBundle.Wip, manifest: ?Manifest, manifest_ast: std.zig.Ast, @@ -263,7 +263,7 @@ pub const JobQueue = struct { pub const Location = union(enum) { remote: Remote, /// A directory found inside the parent package. - relative_path: Package.Path, + relative_path: Cache.Path, /// Recursive Fetch tasks will never use this Location, but it may be /// passed in by the CLI. Indicates the file contents here should be copied /// into the global package cache. It may be a file relative to the cwd or @@ -564,7 +564,7 @@ fn checkBuildFileExistence(f: *Fetch) RunError!void { } /// This function populates `f.manifest` or leaves it `null`. -fn loadManifest(f: *Fetch, pkg_root: Package.Path) RunError!void { +fn loadManifest(f: *Fetch, pkg_root: Cache.Path) RunError!void { const eb = &f.error_bundle; const arena = f.arena.allocator(); const manifest_bytes = pkg_root.root_dir.handle.readFileAllocOptions( @@ -722,7 +722,7 @@ fn queueJobsForDeps(f: *Fetch) RunError!void { } pub fn relativePathDigest( - pkg_root: Package.Path, + pkg_root: Cache.Path, cache_root: Cache.Directory, ) Manifest.MultiHashHexDigest { var hasher = Manifest.Hash.init(.{}); @@ -1658,7 +1658,7 @@ const Filter = struct { }; pub fn depDigest( - pkg_root: Package.Path, + pkg_root: Cache.Path, cache_root: Cache.Directory, dep: Manifest.Dependency, ) ?Manifest.MultiHashHexDigest { diff --git a/src/Package/Module.zig b/src/Package/Module.zig index d6b89efb41..f9cb4475ad 100644 --- a/src/Package/Module.zig +++ b/src/Package/Module.zig @@ -3,7 +3,7 @@ //! to Zcu. https://github.com/ziglang/zig/issues/14307 /// Only files inside this directory can be imported. -root: Package.Path, +root: Cache.Path, /// Relative to `root`. May contain path separators. root_src_path: []const u8, /// Name used in compile errors. Looks like "root.foo.bar". @@ -69,7 +69,7 @@ pub const CreateOptions = struct { builtin_modules: ?*std.StringHashMapUnmanaged(*Module), pub const Paths = struct { - root: Package.Path, + root: Cache.Path, /// Relative to `root`. May contain path separators. root_src_path: []const u8, }; @@ -463,7 +463,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module { /// All fields correspond to `CreateOptions`. pub const LimitedOptions = struct { - root: Package.Path, + root: Cache.Path, root_src_path: []const u8, fully_qualified_name: []const u8, }; |
