From 143732d2a82c057f9efe48895fc798e422894fec Mon Sep 17 00:00:00 2001 From: Neven Villani Date: Tue, 24 Jun 2025 14:42:23 +0200 Subject: [PATCH] One comment out of date --- crates/typst-kit/src/package.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-kit/src/package.rs b/crates/typst-kit/src/package.rs index b51c0a7c8..5b5c23c42 100644 --- a/crates/typst-kit/src/package.rs +++ b/crates/typst-kit/src/package.rs @@ -111,13 +111,13 @@ impl PackageStorage { // None of the strategies above found the package, so all code paths // from now on fail. The rest of the function is only to determine the // cause of the failure. + // We try `namespace/` then `namespace/name/` then `namespace/name/version/` + // and see where the first error occurs. let not_found = |msg| Err(PackageError::NotFound(spec.clone(), msg)); let Some(packages_dir) = &self.package_path else { return not_found(eco_format!("cannot access local package storage")); }; - // Fast path failed. Instead we try to diagnose the issue by going - // down the subdirectories of the expected path one at a time. let namespace_dir = packages_dir.join(format!("{}", spec.namespace)); if !namespace_dir.exists() { return not_found(eco_format!(