Skip to content

Commit

Permalink
refactor(katana): include config in the node struct (dojoengine#2742)
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy authored and remybar committed Dec 2, 2024
1 parent 0f72d24 commit a88b242
Show file tree
Hide file tree
Showing 104 changed files with 5,891 additions and 1,601 deletions.
76 changes: 56 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ members = [
"bin/torii",
"crates/dojo/bindgen",
"crates/dojo/core",
# TODO: to be removed but still used by some tools like LS
"crates/dojo/lang",
"crates/dojo/macros",
"crates/dojo/test-utils",
"crates/dojo/types",
"crates/dojo/utils",
Expand Down Expand Up @@ -82,7 +84,7 @@ dojo-metrics = { path = "crates/metrics" }
# dojo-lang
dojo-bindgen = { path = "crates/dojo/bindgen" }
dojo-core = { path = "crates/dojo/core" }
dojo-lang = { path = "crates/dojo/lang" }
dojo-macros = { path = "crates/dojo/macros" }
dojo-test-utils = { path = "crates/dojo/test-utils" }
dojo-types = { path = "crates/dojo/types" }
dojo-world = { path = "crates/dojo/world" }
Expand Down
2 changes: 1 addition & 1 deletion bin/dojo-language-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ version.workspace = true
[dependencies]
cairo-lang-language-server.workspace = true
clap.workspace = true
dojo-lang.workspace = true
dojo-macros.workspace = true
8 changes: 1 addition & 7 deletions bin/dojo-language-server/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
use cairo_lang_language_server::Tricks;
use clap::Parser;
use dojo_lang::dojo_plugin_suite;

/// Dojo Language Server
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {}

fn main() {
let _args = Args::parse();

let mut tricks = Tricks::default();
tricks.extra_plugin_suites = Some(&|| vec![dojo_plugin_suite()]);
cairo_lang_language_server::start_with_tricks(tricks);
cairo_lang_language_server::start();
}
1 change: 0 additions & 1 deletion bin/sozo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ clap.workspace = true
clap-verbosity-flag.workspace = true
colored.workspace = true
dojo-bindgen.workspace = true
dojo-lang.workspace = true
dojo-types.workspace = true
dojo-utils.workspace = true
dojo-world.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions bin/sozo/src/commands/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use cairo_lang_test_plugin::{test_plugin_suite, TestsCompilationConfig};
use cairo_lang_test_runner::{CompiledTestRunner, RunProfilerConfig, TestCompiler, TestRunConfig};
use cairo_lang_utils::ordered_hash_map::OrderedHashMap;
use clap::Args;
use dojo_lang::dojo_plugin_suite;
use itertools::Itertools;
use scarb::compiler::{
CairoCompilationUnit, CompilationUnit, CompilationUnitAttributes, ContractSelector,
Expand Down Expand Up @@ -197,7 +196,6 @@ pub(crate) fn build_root_database(unit: &CairoCompilationUnit) -> Result<RootDat
b.with_cfg(CfgSet::from_iter([Cfg::name("test"), Cfg::kv("target", "test")]));

b.with_plugin_suite(test_plugin_suite());
b.with_plugin_suite(dojo_plugin_suite());
b.with_plugin_suite(starknet_plugin_suite());

b.build()
Expand Down
4 changes: 2 additions & 2 deletions crates/benches/contracts/src/models/character.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use starknet::{ContractAddress, get_caller_address};
use starknet::ContractAddress;

// TODO import all this when complex benchmarks are merged
#[derive(Introspect, Copy, Drop, Serde)]
Expand Down Expand Up @@ -63,4 +63,4 @@ struct Alias {
#[key]
player: ContractAddress,
name: felt252,
}
}
20 changes: 0 additions & 20 deletions crates/dojo/core-cairo-test/Scarb.lock

This file was deleted.

Loading

0 comments on commit a88b242

Please sign in to comment.