Skip to content

Commit

Permalink
feat(forge-cmd): export ProjectPathsAwareArgs, FilterArgs and update …
Browse files Browse the repository at this point in the history
…manifests
  • Loading branch information
0xgregthedev committed Apr 29, 2024
1 parent d431f74 commit c246c63
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 317 deletions.
80 changes: 80 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ members = [
"crates/evm/traces/",
"crates/fmt/",
"crates/forge/",
"crates/forge/bin",
"crates/macros/",
"crates/test-utils/",
]
Expand Down
6 changes: 3 additions & 3 deletions crates/forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

[[bin]]
name = "forge"
path = "bin/main.rs"
#[[bin]] converted to a crate in the workspace to expose code
#name = "forge"
#path = "bin/main.rs"

[build-dependencies]
vergen = { workspace = true, default-features = false, features = [
Expand Down
136 changes: 136 additions & 0 deletions crates/forge/bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
[package]
name = "forge-cmd"
description = "Forge command line interface"

version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
#name = "forge_cmd"
path = "cmd/lib.rs"
#name = "forge"

[build-dependencies]
vergen = { workspace = true, default-features = false, features = [
"build",
"git",
"gitcl",
] }

[dependencies]
# lib
foundry-block-explorers = { workspace = true, features = ["foundry-compilers"] }
foundry-common.workspace = true
foundry-compilers = { workspace = true, features = ["full"] }
foundry-config.workspace = true
foundry-evm.workspace = true
foundry-wallets.workspace = true
#foundry-linking.workspace = true
#
ethers-contract = { workspace = true, features = ["abigen"] }
#
#revm-inspectors.workspace = true
#
comfy-table = "7"
eyre.workspace = true
#proptest = "1"
rayon = "1"
serde.workspace = true
tracing.workspace = true
yansi.workspace = true
#humantime-serde = "1.1.1"

# bin
forge.workspace = true
forge-doc.workspace = true
forge-fmt.workspace = true
forge-verify.workspace = true
forge-script.workspace = true
foundry-cli.workspace = true
foundry-debugger.workspace = true

alloy-dyn-abi.workspace = true
alloy-json-abi.workspace = true
alloy-primitives = { workspace = true, features = ["serde"] }
alloy-rpc-types.workspace = true
alloy-provider = { workspace = true, features = ["reqwest", "ws", "ipc"] }
alloy-network.workspace = true
alloy-transport.workspace = true
alloy-signer.workspace = true
alloy-consensus.workspace = true
alloy-chains.workspace = true

async-trait = "0.1"
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
clap_complete = "4"
clap_complete_fig = "4"
dialoguer = { version = "0.11", default-features = false }
dunce = "1"
futures = "0.3"
hex.workspace = true
indicatif = "0.17"
itertools.workspace = true
once_cell = "1"
parking_lot = "0.12"
regex = { version = "1", default-features = false }
reqwest = { workspace = true, features = ["json"] }
semver = "1"
serde_json.workspace = true
similar = { version = "2", features = ["inline"] }
solang-parser.workspace = true
strum = { workspace = true, features = ["derive"] }
thiserror = "1"
tokio = { version = "1", features = ["time"] }
toml = { version = "0.8", features = ["preserve_order"] }
toml_edit = "0.22.4"
watchexec = "2.3.2"
evm-disassembler.workspace = true
rustc-hash.workspace = true

# doc server
axum = { workspace = true, features = ["ws"] }
hyper.workspace = true
tower-http = { workspace = true, features = ["fs"] }
opener = "0.6"

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
anvil.workspace = true
foundry-test-utils.workspace = true

mockall = "0.12"
criterion = "0.5"
globset = "0.4"
paste = "1.0"
path-slash = "0.2"
pretty_assertions.workspace = true
svm = { package = "svm-rs", version = "0.5", default-features = false, features = [
"rustls",
] }
tempfile.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }

alloy-signer-wallet.workspace = true

[features]
default = ["rustls"]
rustls = [
"foundry-cli/rustls",
"foundry-wallets/rustls",
"reqwest/rustls-tls",
"reqwest/rustls-tls-native-roots",
]
openssl = ["foundry-cli/openssl", "reqwest/default-tls"]
asm-keccak = ["alloy-primitives/asm-keccak"]
jemalloc = ["dep:tikv-jemallocator"]

#[[bench]]
#name = "test"
#harness = false
9 changes: 9 additions & 0 deletions crates/forge/bin/cmd/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#[path = "mod.rs"]
mod cmd;
use cmd::{install, watch};

mod test;
pub use test::{FilterArgs, ProjectPathsAwareFilter};

#[macro_use]
extern crate tracing;
4 changes: 2 additions & 2 deletions crates/forge/bin/cmd/test/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{install, test::filter::ProjectPathsAwareFilter, watch::WatchArgs};
use super::{install, watch::WatchArgs};
use alloy_primitives::U256;
use clap::Parser;
use eyre::Result;
Expand Down Expand Up @@ -44,7 +44,7 @@ mod filter;
mod summary;
use summary::TestSummaryReporter;

pub use filter::FilterArgs;
pub use filter::{FilterArgs, ProjectPathsAwareFilter};
use forge::traces::render_trace_arena;

// Loads project's figment and merges the build cli arguments into it
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/bin/cmd/test/summary.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::cmd::test::TestOutcome;
use forge::result::TestOutcome;
use comfy_table::{
modifiers::UTF8_ROUND_CORNERS, Attribute, Cell, CellAlignment, Color, Row, Table,
};
Expand Down
Loading

0 comments on commit c246c63

Please sign in to comment.