Skip to content

Commit 8f6757d

Browse files
authored
Merge pull request #215 from itowlson/no-deps
Enable dependencies in cloud
2 parents db9f89c + 49729f6 commit 8f6757d

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

src/commands/deploy.rs

-28
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ fn validate_cloud_app(app: &DeployableApp) -> Result<()> {
600600
check_safe_app_name(app.name()?)?;
601601
ensure!(!app.components().is_empty(), "No components in spin.toml!");
602602
check_no_duplicate_routes(app)?;
603-
check_no_dependencies(app)?;
604603
Ok(())
605604
}
606605

@@ -625,25 +624,6 @@ fn check_no_duplicate_routes(app: &DeployableApp) -> Result<()> {
625624
}
626625
}
627626

628-
fn check_no_dependencies(app: &DeployableApp) -> Result<()> {
629-
let dep_messages: Vec<_> = app
630-
.components()
631-
.iter()
632-
.flat_map(|c| {
633-
c.dependencies()
634-
.iter()
635-
.map(|d| format!("- Dependency '{d}' appears in component '{}'", c.name()))
636-
.collect::<Vec<_>>()
637-
})
638-
.collect();
639-
640-
if dep_messages.is_empty() {
641-
Ok(())
642-
} else {
643-
Err(anyhow!("This application uses component dependencies, which are not supported on Fermyon Cloud\n{}", dep_messages.join("\n")))
644-
}
645-
}
646-
647627
#[derive(Clone)]
648628
struct DeployableApp(locked::LockedApp);
649629

@@ -761,14 +741,6 @@ impl DeployableComponent {
761741
.map(|s| s.to_owned())
762742
.collect()
763743
}
764-
765-
fn dependencies(&self) -> Vec<String> {
766-
self.0.dependencies.keys().map(|n| n.to_string()).collect()
767-
}
768-
769-
fn name(&self) -> &str {
770-
&self.0.id
771-
}
772744
}
773745

774746
fn build_app_base_url(app_domain: &str, cloud_url: &Url) -> Result<Url> {

0 commit comments

Comments
 (0)