Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sol-macro): json feature #629

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ alloy-json-abi = { version = "0.7.3", path = "crates/json-abi", default-features
alloy-primitives = { version = "0.7.3", path = "crates/primitives", default-features = false }
alloy-sol-macro = { version = "0.7.3", path = "crates/sol-macro", default-features = false }
alloy-sol-macro-input = { version = "0.7.3", path = "crates/sol-macro-input", default-features = false }
alloy-sol-macro-expander = {version = "0.7.3", path = "crates/sol-macro-expander", default-features = false }
alloy-sol-macro-expander = { version = "0.7.3", path = "crates/sol-macro-expander", default-features = false }
alloy-sol-type-parser = { version = "0.7.3", path = "crates/sol-type-parser", default-features = false }
alloy-sol-types = { version = "0.7.3", path = "crates/sol-types", default-features = false }
syn-solidity = { version = "0.7.3", path = "crates/syn-solidity", default-features = false }
Expand All @@ -37,6 +37,7 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
ethereum_ssz = { version = "0.5.3", default-features = false }

# macros
proc-macro-error = "1.0"
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"
Expand All @@ -53,6 +54,7 @@ keccak-asm = { version = "0.1.0", default-features = false }
tiny-keccak = "2.0"

# misc
allocative = { version = "0.3.2", default-features = false }
alloy-rlp = { version = "0.3", default-features = false }
alloy-rlp-derive = { version = "0.3", default-features = false }
arbitrary = "1.3"
Expand All @@ -65,12 +67,11 @@ getrandom = "0.2"
hex = { package = "const-hex", version = "1.10", default-features = false, features = ["alloc"] }
itoa = "1"
once_cell = "1"
postgres-types = "0.2.6"
pretty_assertions = "1.4"
proptest = "1"
proptest-derive = "0.4"
rand = { version = "0.8", default-features = false }
ruint = { version = "1.11.1", default-features = false, features = ["alloc"] }
ruint-macro = { version = "1", default-features = false }
winnow = { version = "0.6", default-features = false, features = ["alloc"] }
postgres-types = "0.2.6"
allocative = { version = "0.3.2", default-features = false }
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ alloy-sol-types = { workspace = true, default-features = false, optional = true
alloy-rlp = { workspace = true, default-features = false, optional = true }

[features]
std = ["alloy-primitives/std", "alloy-json-abi?/std", "alloy-dyn-abi?/std", "alloy-sol-types?/std", "json"]
std = ["alloy-primitives/std", "alloy-json-abi?/std", "alloy-dyn-abi?/std", "alloy-sol-types?/std"]

dyn-abi = ["sol-types", "dep:alloy-dyn-abi"]
json-abi = ["json", "serde", "dep:alloy-json-abi"]
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub use alloy_rlp as rlp;
/// [`sol!`](sol_types::sol!) `macro_rules!` wrapper to set import attributes.
///
/// See [`sol!`](sol_types::sol!) for the actual macro documentation.
#[cfg(all(not(doc), feature = "sol-types", feature = "json"))] // Show the actual macro in docs.
#[cfg(all(not(doc), feature = "sol-types"))] // Show the actual macro in docs.
#[macro_export]
macro_rules! sol {
($($t:tt)*) => {
Expand Down
2 changes: 1 addition & 1 deletion crates/dyn-abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ derive_arbitrary = { workspace = true, optional = true }
proptest = { workspace = true, optional = true }

[dev-dependencies]
alloy-dyn-abi = { path = ".", features = ["std"] }
alloy-dyn-abi = { path = ".", version = ">=0", features = ["std"] }
criterion.workspace = true
ethabi = "18"
rand = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro-expander/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ syn = { workspace = true, features = ["extra-traits"] }
heck = "0.4"
hex.workspace = true
indexmap = "2"
proc-macro-error = "1.0"
proc-macro-error.workspace = true
tiny-keccak = { workspace = true, features = ["keccak"] }

# json
Expand Down
1 change: 1 addition & 0 deletions crates/sol-macro-input/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub use input::{SolInput, SolInputKind};

mod expander;
pub use expander::SolInputExpander;

#[cfg(feature = "json")]
mod json;
#[cfg(feature = "json")]
Expand Down
3 changes: 1 addition & 2 deletions crates/sol-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ rustdoc-args = ["--cfg", "docsrs"]
alloy-sol-macro-input.workspace = true
alloy-sol-macro-expander.workspace = true

proc-macro-error.workspace = true
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["extra-traits"] }

proc-macro-error = "1.0"

[features]
json = ["alloy-sol-macro-expander/json"]