diff --git a/crates/dojo-core/Scarb.lock b/crates/dojo-core/Scarb.lock index ea70fe0f49..a3f7615a66 100644 --- a/crates/dojo-core/Scarb.lock +++ b/crates/dojo-core/Scarb.lock @@ -4,11 +4,3 @@ version = 1 [[package]] name = "dojo" version = "1.0.0-alpha.4" -dependencies = [ - "dojo_plugin", -] - -[[package]] -name = "dojo_plugin" -version = "1.0.0-alpha.4" -source = "git+https://github.com/dojoengine/dojo?rev=f15def33#f15def330c0d099e79351d11c197f63e8cc1ff36" diff --git a/crates/dojo-core/Scarb.toml b/crates/dojo-core/Scarb.toml index a84a42da22..d0e0718a42 100644 --- a/crates/dojo-core/Scarb.toml +++ b/crates/dojo-core/Scarb.toml @@ -6,7 +6,6 @@ name = "dojo" version = "1.0.0-alpha.4" [dependencies] -dojo_plugin = { git = "https://github.com/dojoengine/dojo", rev = "f15def33" } starknet = "=2.7.0" [lib] diff --git a/crates/dojo-world/src/metadata.rs b/crates/dojo-world/src/metadata.rs index 9a8e3d3b69..ad7459dcd3 100644 --- a/crates/dojo-world/src/metadata.rs +++ b/crates/dojo-world/src/metadata.rs @@ -73,14 +73,22 @@ pub fn dojo_metadata_from_package(package: &Package, ws: &Workspace<'_>) -> Resu } // If not dojo dependent, we should skip metadata gathering. - if !package - .manifest - .summary - .dependencies - .iter() - .any(|dep| dep.name.as_str() == "dojo" || dep.name.as_str() == "dojo_plugin") - { - return Ok(DojoMetadata::default()); + if !package.manifest.summary.dependencies.iter().any(|dep| dep.name.as_str() == "dojo") { + // Some tests (like dojo-core) may depend on dojo, but there is no dojo dependency in the + // manifest. In case the profile config file exists, we extract the default + // namespace from it. + if let Ok(profile_config) = ProfileConfig::new( + &Utf8PathBuf::from(package.manifest_path().parent().unwrap()), + ws.current_profile()?, + ) { + let metadata = + DojoMetadata { namespace: profile_config.namespace, ..Default::default() }; + + return Ok(metadata); + } else { + tracing::trace!(target: LOG_TARGET, package = ?package.manifest_path(), "No dojo dependency or profile config file found, skipping metadata collection."); + return Ok(DojoMetadata::default()); + } } let profile_config = ProfileConfig::new( diff --git a/examples/spawn-and-move/Scarb.lock b/examples/spawn-and-move/Scarb.lock index 8bcf917cfe..38cedc596a 100644 --- a/examples/spawn-and-move/Scarb.lock +++ b/examples/spawn-and-move/Scarb.lock @@ -18,9 +18,6 @@ dependencies = [ [[package]] name = "dojo" version = "1.0.0-alpha.4" -dependencies = [ - "dojo_plugin", -] [[package]] name = "dojo_examples" @@ -30,8 +27,3 @@ dependencies = [ "bestiary", "dojo", ] - -[[package]] -name = "dojo_plugin" -version = "1.0.0-alpha.4" -source = "git+https://github.com/dojoengine/dojo?rev=f15def33#f15def330c0d099e79351d11c197f63e8cc1ff36"