Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion crates/oci/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ impl OciLoader {
}
}

async fn resolve_component_content_refs(
/// Resolves all digest references in the component (including source, dependencies,
/// and asset files). Wasm sources are replaced with cache paths. Asset files are
/// collected to a mount path, and the component `files` amended to reflect that.
///
/// This function assumes that:
///
/// 1. All resolvable items have digest or inline sources.
/// 2. All digest-addressed content is already in the cache.
///
/// If either of these is not true, the function errors.
pub async fn resolve_component_content_refs(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a little strange to be constructing a loader just to configure the working directory for this function -- but as you've said in the PR description, this is a weird workaround

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - I could make it a free function and pass the working dir in as a parameter. But maybe easier to just ship it as is - it's a fairly modest piece of our Bad APIs budget, and as you say we need to rework anyway.

&self,
component: &mut LockedComponent,
cache: &Cache,
Expand Down
Loading