From 49729f60c4058db5fa967171ec7947cc89baa562 Mon Sep 17 00:00:00 2001 From: itowlson Date: Tue, 3 Dec 2024 10:57:52 +1300 Subject: [PATCH] YES DEPS Signed-off-by: itowlson --- src/commands/deploy.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/commands/deploy.rs b/src/commands/deploy.rs index caa7b5c..12a96ec 100644 --- a/src/commands/deploy.rs +++ b/src/commands/deploy.rs @@ -600,7 +600,6 @@ fn validate_cloud_app(app: &DeployableApp) -> Result<()> { check_safe_app_name(app.name()?)?; ensure!(!app.components().is_empty(), "No components in spin.toml!"); check_no_duplicate_routes(app)?; - check_no_dependencies(app)?; Ok(()) } @@ -625,25 +624,6 @@ fn check_no_duplicate_routes(app: &DeployableApp) -> Result<()> { } } -fn check_no_dependencies(app: &DeployableApp) -> Result<()> { - let dep_messages: Vec<_> = app - .components() - .iter() - .flat_map(|c| { - c.dependencies() - .iter() - .map(|d| format!("- Dependency '{d}' appears in component '{}'", c.name())) - .collect::>() - }) - .collect(); - - if dep_messages.is_empty() { - Ok(()) - } else { - Err(anyhow!("This application uses component dependencies, which are not supported on Fermyon Cloud\n{}", dep_messages.join("\n"))) - } -} - #[derive(Clone)] struct DeployableApp(locked::LockedApp); @@ -761,14 +741,6 @@ impl DeployableComponent { .map(|s| s.to_owned()) .collect() } - - fn dependencies(&self) -> Vec { - self.0.dependencies.keys().map(|n| n.to_string()).collect() - } - - fn name(&self) -> &str { - &self.0.id - } } fn build_app_base_url(app_domain: &str, cloud_url: &Url) -> Result {