Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dojo-lang): add a default namespace to ensure language server support #2472

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading