Skip to content

Commit

Permalink
fix: formatting config + ci (dojoengine#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy authored Aug 5, 2023
1 parent a2ccbde commit 5861dae
Show file tree
Hide file tree
Showing 36 changed files with 171 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: nightly
components: rustfmt

- uses: Swatinem/rust-cache@v2
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cairo-lang-lowering = "2.1.0-rc4"
cairo-lang-parser = "2.1.0-rc4"
cairo-lang-plugins = "2.1.0-rc4"
cairo-lang-project = "2.1.0-rc4"
cairo-lang-semantic = { version = "2.1.0-rc4", features = ["testing"] }
cairo-lang-semantic = { version = "2.1.0-rc4", features = [ "testing" ] }
cairo-lang-sierra = "2.1.0-rc4"
cairo-lang-sierra-generator = "2.1.0-rc4"
cairo-lang-sierra-to-casm = "2.1.0-rc4"
Expand All @@ -50,9 +50,9 @@ cairo-lang-test-runner = "2.1.0-rc4"
cairo-lang-test-utils = "2.1.0-rc4"
cairo-lang-utils = "2.1.0-rc4"
cairo-vm = "0.8.2"
camino = { version = "1.1.2", features = ["serde1"] }
chrono = { version = "0.4.24", features = ["serde"] }
clap = { version = "4.2", features = ["derive"] }
camino = { version = "1.1.2", features = [ "serde1" ] }
chrono = { version = "0.4.24", features = [ "serde" ] }
clap = { version = "4.2", features = [ "derive" ] }
clap_complete = "4.3"
colored = "2"
console = "0.15.7"
Expand All @@ -68,16 +68,16 @@ rayon = "0.9.0"
salsa = "0.16.1"
scarb = { git = "https://github.com/software-mansion/scarb", rev = "a3e7b16" }
semver = "1.0.5"
serde = { version = "1.0.156", features = ["derive"] }
serde = { version = "1.0.156", features = [ "derive" ] }
serde_json = "1.0"
serde_with = "2.3.1"
smol_str = { version = "0.2.0", features = ["serde"] }
smol_str = { version = "0.2.0", features = [ "serde" ] }
starknet = "0.4.0"
starknet-crypto = "0.5.1"
starknet_api = { git = "https://github.com/starkware-libs/starknet-api", rev = "ecc9b6946ef13003da202838e4124a9ad2efabb0" }
test-log = "0.2.11"
thiserror = "1.0.32"
tokio = { version = "1.16", features = ["full"] }
tokio = { version = "1.16", features = [ "full" ] }
toml = "0.7.4"
tracing = "0.1"
tracing-subscriber = "0.3.16"
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ thiserror.workspace = true

[dev-dependencies]
camino.workspace = true
dojo-test-utils = { path = "../dojo-test-utils", features = ["build-examples"] }
dojo-test-utils = { path = "../dojo-test-utils", features = [ "build-examples" ] }
tokio.workspace = true
6 changes: 4 additions & 2 deletions crates/dojo-client/src/contract/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ impl<'a, P: Provider + Sync> SystemReader<'a, P> {
.call(
FunctionCall {
contract_address: world.address,
calldata: vec![cairo_short_string_to_felt(&name)
.map_err(SystemReaderError::CairoShortStringToFeltError)?],
calldata: vec![
cairo_short_string_to_felt(&name)
.map_err(SystemReaderError::CairoShortStringToFeltError)?,
],
entry_point_selector: get_selector_from_name("system").unwrap(),
},
block_id,
Expand Down
4 changes: 2 additions & 2 deletions crates/dojo-core/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "dojo"
version = "0.1.0"
cairo-version = "2.1.0-rc4"
description = "The Dojo Core library for autonomous worlds."
name = "dojo"
version = "0.1.0"

[dependencies]
dojo_plugin = { git = "https://github.com/dojoengine/dojo" }
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo-core/tests/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
description = "Tests for Dojo Core"
name = "dojo_tests"
version = "0.1.0"
description = "Tests for Dojo Core"

[dependencies]
dojo = { path = "../" }
Expand Down
4 changes: 2 additions & 2 deletions crates/dojo-defi/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "dojo_defi"
version = "0.1.0"
cairo-version = "2.0.0-rc4"
description = "Implementations of a defi primitives for the Dojo framework"
name = "dojo_defi"
version = "0.1.0"

[dependencies]
cubit = { git = "https://github.com/influenceth/cubit" }
Expand Down
4 changes: 2 additions & 2 deletions crates/dojo-erc/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "dojo_erc"
version = "0.1.0"
cairo-version = "2.1.0-rc4"
description = "Implementations of ERC standards for the Dojo framework"
name = "dojo_erc"
version = "0.1.0"

[dependencies]
dojo = { path = "../dojo-core" }
Expand Down
24 changes: 12 additions & 12 deletions crates/dojo-lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
[package]
name = "dojo-lang"
version.workspace = true
description = "Dojo capabilities and utilities on top of Starknet."
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "Dojo capabilities and utilities on top of Starknet."
name = "dojo-lang"
repository.workspace = true
version.workspace = true

[features]
testing = []
testing = [ ]

[dependencies]
anyhow.workspace = true
assert_fs = "1.0.9"
camino.workspace = true
cairo-lang-compiler.workspace = true
cairo-lang-defs.workspace = true
cairo-lang-diagnostics.workspace = true
cairo-lang-lowering.workspace = true
cairo-lang-filesystem.workspace = true
cairo-lang-lowering.workspace = true
cairo-lang-parser.workspace = true
cairo-lang-plugins.workspace = true
cairo-lang-project.workspace = true
cairo-lang-semantic.workspace = true
cairo-lang-sierra-generator.workspace = true
cairo-lang-syntax.workspace = true
cairo-lang-starknet.workspace = true
cairo-lang-syntax.workspace = true
cairo-lang-utils.workspace = true
camino.workspace = true
convert_case.workspace = true
dojo-types = { path = "../dojo-types" }
dojo-world = { path = "../dojo-world" }
indoc.workspace = true
itertools.workspace = true
salsa.workspace = true
sanitizer = "0.1.6"
scarb.workspace = true
semver.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_with = "2.3.1"
smol_str.workspace = true
starknet.workspace = true
thiserror = "1.0.32"
tracing.workspace = true
salsa.workspace = true
sanitizer = "0.1.6"
starknet.workspace = true
url = "2.2.2"

[dev-dependencies]
cairo-lang-formatter.workspace = true
cairo-lang-semantic.workspace = true
cairo-lang-test-utils.workspace = true
dojo-test-utils = { path = "../dojo-test-utils" }
env_logger = "0.10.0"
pretty_assertions.workspace = true
test-log.workspace = true
dojo-test-utils = { path = "../dojo-test-utils" }
2 changes: 1 addition & 1 deletion crates/dojo-lang/src/manifest_test_crate/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[package]
cairo_version = "1.1.0"
name = "manifest_test"
version = "0.1.0"
cairo_version = "1.1.0"
6 changes: 1 addition & 5 deletions crates/dojo-lang/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ impl GeneratedFileAuxData for DojoAuxData {
self
}
fn eq(&self, other: &dyn GeneratedFileAuxData) -> bool {
if let Some(other) = other.as_any().downcast_ref::<Self>() {
self == other
} else {
false
}
if let Some(other) = other.as_any().downcast_ref::<Self>() { self == other } else { false }
}
}
impl AsDynGeneratedFileAuxData for DojoAuxData {
Expand Down
14 changes: 7 additions & 7 deletions crates/dojo-language-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "dojo-languge-server"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
Expand All @@ -10,16 +10,16 @@ path = "src/bin/language_server.rs"

[dependencies]
anyhow.workspace = true
dojo-lang = { path = "../dojo-lang" }
cairo-lang-compiler.workspace = true
cairo-lang-filesystem.workspace = true
cairo-lang-language-server.workspace = true
cairo-lang-starknet.workspace = true
cairo-lang-semantic.workspace = true
cairo-lang-plugins.workspace = true
cairo-lang-filesystem.workspace = true
cairo-lang-semantic.workspace = true
cairo-lang-starknet.workspace = true
cairo-lang-utils.workspace = true
dojo-lang = { path = "../dojo-lang" }
log = "0.4.14"
tokio = { version = "1.18.2", features = ["full", "sync"] }
tower-lsp = "0.19.0"
salsa = "0.16.1"
smol_str.workspace = true
tokio = { version = "1.18.2", features = [ "full", "sync" ] }
tower-lsp = "0.19.0"
6 changes: 3 additions & 3 deletions crates/dojo-physics/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "dojo_physics"
version = "0.1.0"
cairo-version = "2.0.0-rc4"
description = "Implementations of a physics library for the Dojo framework"
name = "dojo_physics"
version = "0.1.0"

[dependencies]
dojo = { path = "../dojo-core" }
cubit = { git = "https://github.com/influenceth/cubit" }
dojo = { path = "../dojo-core" }

[[target.dojo]]
2 changes: 1 addition & 1 deletion crates/dojo-physics/examples/projectile/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "0.1.0"

[dependencies]
cubit = { git = "https://github.com/influenceth/cubit" }
dojo_physics = { path = "../.."}
dojo_physics = { path = "../.." }
2 changes: 1 addition & 1 deletion crates/dojo-physics/examples/projectile/cairo_project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[crate_roots]
projectile = "src"
dojo_physics = "../../src"
projectile = "src"
8 changes: 4 additions & 4 deletions crates/dojo-signers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "dojo-signers"
version.workspace = true
description = "Dojo Signer implementations"
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "Dojo Signer implementations"
name = "dojo-signers"
repository.workspace = true
version.workspace = true

[dependencies]
anyhow.workspace = true
Expand Down
20 changes: 10 additions & 10 deletions crates/dojo-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[package]
name = "dojo-test-utils"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true
name = "dojo-test-utils"
repository.workspace = true
version.workspace = true

[dependencies]
anyhow.workspace = true
assert_fs = "1.0.9"
async-trait.workspace = true
cairo-lang-compiler.workspace = true
cairo-lang-filesystem.workspace = true
cairo-lang-starknet.workspace = true
cairo-lang-project.workspace = true
cairo-lang-starknet.workspace = true
camino.workspace = true
dojo-lang = { path = "../dojo-lang" }
jsonrpsee = { version = "0.16.2", features = ["server"] }
jsonrpsee = { version = "0.16.2", features = [ "server" ] }
katana-core = { path = "../katana/core" }
katana-rpc = { path = "../katana/rpc" }
tokio = { version = "1.28.0", features = ["full"] }
thiserror.workspace = true
toml = "0.7.1"
scarb.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_with.workspace = true
smol_str.workspace = true
starknet.workspace = true
url = "2.2.2"
thiserror.workspace = true
tokio = { version = "1.28.0", features = [ "full" ] }
toml = "0.7.1"
tracing.workspace = true
url = "2.2.2"

[build-dependencies]
assert_fs = "1.0.9"
Expand All @@ -37,4 +37,4 @@ dojo-lang = { path = "../dojo-lang" }
scarb.workspace = true

[features]
build-examples = []
build-examples = [ ]
21 changes: 9 additions & 12 deletions crates/dojo-world/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "dojo-world"
version.workspace = true
description = "Dojo world specification. For example, crates and flags used for compilation."
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "Dojo world specification. For example, crates and flags used for compilation."
name = "dojo-world"
repository.workspace = true
version.workspace = true

[dependencies]
anyhow.workspace = true
Expand All @@ -16,24 +16,21 @@ camino.workspace = true
convert_case.workspace = true
dojo-types = { path = "../dojo-types" }
futures = "0.3.28"
reqwest = { version = "0.11.18", default-features = false, features = [
"rustls-tls",
] }
reqwest = { version = "0.11.18", default-features = false, features = [ "rustls-tls" ] }
serde.workspace = true
serde_json.workspace = true
serde_with.workspace = true
smol_str.workspace = true
starknet.workspace = true
starknet-crypto.workspace = true
starknet.workspace = true
thiserror.workspace = true
tracing.workspace = true
tokio.workspace = true
tracing.workspace = true
url = "2.2.2"

[dev-dependencies]
assert_fs = "1.0.9"
assert_matches = "1.5.0"
dojo-test-utils = { path = "../dojo-test-utils" }
dojo-lang = { path = "../dojo-lang" }
tokio = { version = "1.28.0", features = ["full"] }

dojo-test-utils = { path = "../dojo-test-utils" }
tokio = { version = "1.28.0", features = [ "full" ] }
Loading

0 comments on commit 5861dae

Please sign in to comment.