Skip to content

Commit 4e0ee4d

Browse files
Merge pull request #2782 from fibonacci1729/fixes
A few fixes after yesterday's mergepalooza
2 parents a1fe928 + 6a46329 commit 4e0ee4d

File tree

4 files changed

+9
-299
lines changed

4 files changed

+9
-299
lines changed

crates/compose/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use wac_graph::{CompositionGraph, NodeId};
2626
/// dependent component. Finally, the composer will export all exports from the
2727
/// dependent component to its dependents. The composer will then encode the
2828
/// composition graph into a byte array and return it.
29-
pub async fn compose<'a, L: LockedComponentSourceLoader>(
29+
pub async fn compose<'a, L: ComponentSourceLoader>(
3030
loader: &'a L,
3131
component: &LockedComponent,
3232
) -> Result<Vec<u8>, ComposeError> {
@@ -35,7 +35,7 @@ pub async fn compose<'a, L: LockedComponentSourceLoader>(
3535

3636
/// This trait is used to load component source code from a locked component source across various embdeddings.
3737
#[async_trait::async_trait]
38-
pub trait LockedComponentSourceLoader {
38+
pub trait ComponentSourceLoader {
3939
async fn load_component_source(
4040
&self,
4141
source: &locked::LockedComponentSource,
@@ -97,7 +97,7 @@ struct Composer<'a, L> {
9797
loader: &'a L,
9898
}
9999

100-
impl<'a, L: LockedComponentSourceLoader> Composer<'a, L> {
100+
impl<'a, L: ComponentSourceLoader> Composer<'a, L> {
101101
async fn compose(mut self, component: &LockedComponent) -> Result<Vec<u8>, ComposeError> {
102102
let source = self
103103
.loader

crates/trigger/src/cli.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl<T: Trigger> TriggerAppBuilder<T> {
355355
struct SimpleComponentLoader;
356356

357357
#[async_trait]
358-
impl spin_compose::LockedComponentSourceLoader for SimpleComponentLoader {
358+
impl spin_compose::ComponentSourceLoader for SimpleComponentLoader {
359359
async fn load_component_source(
360360
&self,
361361
source: &spin_app::locked::LockedComponentSource,
@@ -399,7 +399,10 @@ impl<T: Trigger> TriggerAppBuilder<T> {
399399
let composed = spin_compose::compose(self, component.locked)
400400
.await
401401
.with_context(|| {
402-
format!("failed to compose component {:?}", component.locked.id)
402+
format!(
403+
"failed to resolve dependencies for component {:?}",
404+
component.locked.id
405+
)
403406
})?;
404407

405408
spin_core::Component::new(engine, composed)

crates/trigger/src/loader.rs

Lines changed: 0 additions & 293 deletions
This file was deleted.

docs/content/sips/0xx-spin-factors.md renamed to docs/content/sips/021-spin-factors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title = "SIP 0XX - Spin Factors"
1+
title = "SIP 021 - Spin Factors"
22
template = "main"
33
date = "2024-05-20T12:00:00Z"
44

0 commit comments

Comments
 (0)