Skip to content

Commit

Permalink
fix: add a default namespace to ensure language server support
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Sep 24, 2024
1 parent dd8b160 commit b70a703
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,3 @@ dependencies = [
[[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"
9 changes: 8 additions & 1 deletion crates/dojo-world/src/config/namespace_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ use serde::Deserialize;
pub const NAMESPACE_CFG_PREFIX: &str = "nm|";
pub const DEFAULT_NAMESPACE_CFG_KEY: &str = "namespace_default";
pub const DOJO_MANIFESTS_DIR_CFG_KEY: &str = "dojo_manifests_dir";
pub const DEFAULT_NAMESPACE: &str = "DEFAULT_NAMESPACE";

/// Namespace configuration.
#[derive(Debug, Clone, Default, Deserialize)]
#[derive(Debug, Clone, Deserialize)]
pub struct NamespaceConfig {
pub default: String,
pub mappings: Option<HashMap<String, String>>,
}

impl Default for NamespaceConfig {
fn default() -> Self {
NamespaceConfig { default: DEFAULT_NAMESPACE.to_string(), mappings: None }
}
}

impl NamespaceConfig {
/// Creates a new namespace configuration with a default namespace.
pub fn new(default: &str) -> Self {
Expand Down
8 changes: 0 additions & 8 deletions crates/torii/types-test/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ 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"

[[package]]
name = "types_test"
Expand Down
Binary file modified spawn-and-move-db.tar.gz
Binary file not shown.
Binary file modified types-test-db.tar.gz
Binary file not shown.

0 comments on commit b70a703

Please sign in to comment.