Skip to content

Commit 29194bb

Browse files
committed
fix udeps warnings
1 parent 96ee199 commit 29194bb

File tree

7 files changed

+32
-21
lines changed

7 files changed

+32
-21
lines changed

crates/cairo-lang-compiler/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@ cairo-lang-sierra = { path = "../cairo-lang-sierra", version = "1.1.0" }
2020
cairo-lang-sierra-generator = { path = "../cairo-lang-sierra-generator", version = "1.1.0" }
2121
cairo-lang-syntax = { path = "../cairo-lang-syntax", version = "1.1.0" }
2222
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0" }
23-
clap.workspace = true
2423
log.workspace = true
2524
salsa.workspace = true
2625
smol_str.workspace = true
2726
thiserror.workspace = true
2827

28+
# Optional
29+
clap = { workspace = true, optional = true }
30+
2931
[dev-dependencies]
3032
test-log.workspace = true
3133

3234
[features]
33-
env_logger = ["cairo-lang-utils/env_logger"]
35+
binary = ["cairo-lang-utils/env_logger", "dep:clap"]
3436

3537
[[bin]]
3638
name = "cairo-compile"
3739
path = "src/cli.rs"
38-
required-features = ["env_logger"]
40+
required-features = ["binary"]

crates/cairo-lang-formatter/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ cairo-lang-filesystem = { path = "../cairo-lang-filesystem", version = "1.1.0" }
1313
cairo-lang-parser = { path = "../cairo-lang-parser", version = "1.1.0" }
1414
cairo-lang-syntax = { path = "../cairo-lang-syntax", version = "1.1.0" }
1515
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0" }
16-
clap.workspace = true
1716
colored.workspace = true
1817
diffy.workspace = true
1918
ignore.workspace = true
@@ -22,15 +21,18 @@ log.workspace = true
2221
salsa.workspace = true
2322
smol_str.workspace = true
2423

24+
# Optional
25+
clap = { workspace = true, optional = true }
26+
2527
[dev-dependencies]
2628
pretty_assertions.workspace = true
2729
test-case.workspace = true
2830
test-log.workspace = true
2931

3032
[features]
31-
env_logger = ["cairo-lang-utils/env_logger"]
33+
binary = ["cairo-lang-utils/env_logger", "dep:clap"]
3234

3335
[[bin]]
3436
name = "cairo-format"
3537
path = "src/bin/cli.rs"
36-
required-features = ["env_logger"]
38+
required-features = ["binary"]

crates/cairo-lang-sierra-to-casm/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ license-file.workspace = true
77
description = "Emitting of CASM instructions from Sierra code."
88

99
[dependencies]
10-
anyhow.workspace = true
1110
assert_matches.workspace = true
1211
cairo-felt.workspace = true
1312
cairo-lang-casm = { path = "../cairo-lang-casm", version = "1.1.0" }
1413
cairo-lang-sierra = { path = "../cairo-lang-sierra", version = "1.1.0" }
1514
cairo-lang-sierra-ap-change = { path = "../cairo-lang-sierra-ap-change", version = "1.1.0" }
1615
cairo-lang-sierra-gas = { path = "../cairo-lang-sierra-gas", version = "1.1.0" }
1716
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0" }
18-
clap.workspace = true
1917
indoc.workspace = true
2018
itertools.workspace = true
2119
log.workspace = true
2220
num-bigint.workspace = true
2321
num-traits.workspace = true
2422
thiserror.workspace = true
2523

24+
# Optional
25+
clap = { workspace = true, optional = true }
26+
anyhow = { workspace = true, optional = true }
27+
2628
[dev-dependencies]
2729
env_logger.workspace = true
2830
indoc.workspace = true
@@ -32,9 +34,9 @@ test-log.workspace = true
3234

3335
[features]
3436
testing = []
35-
env_logger = ["cairo-lang-utils/env_logger"]
37+
binary = ["cairo-lang-utils/env_logger", "dep:clap", "dep:anyhow"]
3638

3739
[[bin]]
3840
name = "sierra-compile"
3941
path = "src/cli.rs"
40-
required-features = ["env_logger"]
42+
required-features = ["binary"]

crates/cairo-lang-syntax-codegen/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ description = "Cairo syntax code generation."
1010
normal = ["cairo-lang-syntax"]
1111

1212
[dependencies]
13-
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0" }
1413
genco.workspace = true
15-
log.workspace = true
1614
xshell.workspace = true
1715

16+
# Optional
17+
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0", optional = true }
18+
log = { workspace = true, optional = true }
19+
1820
[dev-dependencies]
1921
env_logger.workspace = true
2022
test-log.workspace = true
2123

2224
[features]
23-
env_logger = ["cairo-lang-utils/env_logger"]
25+
binary = ["cairo-lang-utils/env_logger", "dep:log"]
2426

2527
[[bin]]
2628
name = "generate-syntax"
2729
path = "src/generate_syntax.rs"
28-
required-features = ["env_logger"]
30+
required-features = ["binary"]

crates/cairo-lang-test-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ description = "Utilities for writing tests in the Cairo compiler project."
99
[dependencies]
1010
cairo-lang-utils = { path = "../cairo-lang-utils", version = "1.1.0" }
1111
log.workspace = true
12-
env_logger.workspace = true
1312
pretty_assertions.workspace = true
1413

1514
[dev-dependencies]
1615
test-log.workspace = true
16+
env_logger.workspace = true

crates/cairo-lang-utils/Cargo.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@ repository.workspace = true
66
license-file.workspace = true
77
description = "General utilities for the Cairo compiler project."
88

9-
[features]
10-
testing = []
11-
129
[dependencies]
1310
indexmap.workspace = true
1411
itertools.workspace = true
15-
log.workspace = true
1612
num-bigint.workspace = true
1713
num-integer.workspace = true
1814
num-traits.workspace = true
1915
serde.workspace = true
20-
time.workspace = true
16+
17+
# Optional
2118
env_logger = { workspace = true, optional = true }
19+
time = { workspace = true, optional = true }
20+
log = { workspace = true, optional = true }
2221

2322
[dev-dependencies]
2423
serde_json.workspace = true
2524
test-case.workspace = true
2625
test-log.workspace = true
2726
env_logger.workspace = true
27+
28+
[features]
29+
testing = []
30+
env_logger = ["dep:env_logger", "dep:time", "dep:log"]

scripts/cairo_fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
cargo run --bin cairo-format -- --recursive "$@"
3+
cargo run --bin cairo-format --features="binary" -- --recursive "$@"

0 commit comments

Comments
 (0)