Skip to content

Commit

Permalink
only use env_logger in binaries (#3276)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdelabro authored Jun 1, 2023
1 parent 210b7ec commit 7cbc6cf
Show file tree
Hide file tree
Showing 32 changed files with 272 additions and 69 deletions.
109 changes: 100 additions & 9 deletions Cargo.lock

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

15 changes: 14 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ members = [
"crates/cairo-lang-syntax-codegen",
"crates/cairo-lang-test-runner",
"crates/cairo-lang-utils",
"crates/bin/cairo-language-server",
"crates/bin/cairo-compile",
"crates/bin/cairo-format",
"crates/bin/cairo-test",
"crates/bin/cairo-run",
"crates/bin/sierra-compile",
"crates/bin/starknet-compile",
"crates/bin/starknet-sierra-compile",
"crates/bin/generate-syntax",
"tests",
]

Expand Down Expand Up @@ -85,7 +94,11 @@ test-case = "2.2.2"
test-case-macros = "2.2.2"
test-log = "0.2.11"
thiserror = "1.0.32"
time = { version = "0.3.20", features = ["formatting", "macros", "local-offset"] }
time = { version = "0.3.20", features = [
"formatting",
"macros",
"local-offset",
] }
tokio = { version = "1.18.2", features = ["full", "sync"] }
toml = "0.4.2"
tower-lsp = "0.17.0"
Expand Down
16 changes: 16 additions & 0 deletions crates/bin/cairo-compile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "cairo-compile"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true
log.workspace = true

cairo-lang-compiler = { path = "../../cairo-lang-compiler" }
cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
File renamed without changes.
18 changes: 18 additions & 0 deletions crates/bin/cairo-format/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "cairo-format"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true
log.workspace = true
colored.workspace = true
ignore.workspace = true

cairo-lang-formatter = { path = "../../cairo-lang-formatter" }
cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
File renamed without changes.
15 changes: 15 additions & 0 deletions crates/bin/cairo-language-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "cairo-language-server"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
tokio.workspace = true
log.workspace = true

cairo-lang-language-server = { path = "../../cairo-lang-language-server" }
cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use cairo_lang_language_server::serve_language_service;
use cairo_lang_utils::logging::init_logging;

#[tokio::main]
async fn main() {
init_logging(log::LevelFilter::Warn);
serve_language_service().await;
}
20 changes: 20 additions & 0 deletions crates/bin/cairo-run/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "cairo-run"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true

cairo-lang-runner = { path = "../../cairo-lang-runner" }
cairo-lang-starknet = { path = "../../cairo-lang-starknet" }
cairo-lang-diagnostics = { path = "../../cairo-lang-diagnostics" }
cairo-lang-sierra = { path = "../../cairo-lang-sierra" }
cairo-lang-sierra-generator = { path = "../../cairo-lang-sierra-generator" }
cairo-lang-compiler = { path = "../../cairo-lang-compiler" }
cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
File renamed without changes.
12 changes: 12 additions & 0 deletions crates/bin/cairo-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "cairo-test"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true

cairo-lang-test-runner = { path = "../../cairo-lang-test-runner" }
File renamed without changes.
14 changes: 14 additions & 0 deletions crates/bin/generate-syntax/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "generate-syntax"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
log.workspace = true

cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
cairo-lang-syntax-codegen = { path = "../../cairo-lang-syntax-codegen" }
File renamed without changes.
18 changes: 18 additions & 0 deletions crates/bin/sierra-compile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "sierra-compile"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
log.workspace = true
clap.workspace = true
indoc.workspace = true

cairo-lang-sierra = { path = "../../cairo-lang-sierra" }
cairo-lang-sierra-to-casm = { path = "../../cairo-lang-sierra-to-casm" }
cairo-lang-utils = { path = "../../cairo-lang-utils", features = [
"env_logger",
] }
File renamed without changes.
13 changes: 13 additions & 0 deletions crates/bin/starknet-compile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "starknet-compile"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true

cairo-lang-compiler = { path = "../../cairo-lang-compiler" }
cairo-lang-starknet = { path = "../../cairo-lang-starknet" }
File renamed without changes.
Loading

0 comments on commit 7cbc6cf

Please sign in to comment.