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

reth-eth-types: Do not import JsInspectorError by default #10202

Conversation

citizen-stig
Copy link
Contributor

For purpose of serving EthApiErrors in RPC for sovereign rollup I use reth-eth-types crate.

As it was fixed to using it in #10175

This PR removes approximately 42 dependencies from my tree if I use this crate without default features.

git diff | grep '\-name'
-name = "boa_ast"
-name = "boa_engine"
-name = "boa_gc"
-name = "boa_interner"
-name = "boa_macros"
-name = "boa_parser"
-name = "boa_profiler"
-name = "boa_string"
-name = "fast-float"
-name = "icu_collections"
-name = "icu_locid"
-name = "icu_locid_transform"
-name = "icu_locid_transform_data"
-name = "icu_normalizer"
-name = "icu_normalizer_data"
-name = "icu_properties"
-name = "icu_properties_data"
-name = "icu_provider"
-name = "icu_provider_macros"
-name = "intrusive-collections"
-name = "litemap"
-name = "memoffset"
-name = "num_threads"
-name = "phf_generator"
-name = "phf_macros"
-name = "pollster"
-name = "regress"
-name = "ryu-js"
-name = "sptr"
-name = "synstructure"
-name = "thin-vec"
-name = "tinystr"
-name = "utf16_iter"
-name = "utf8_iter"
-name = "write16"
-name = "writeable"
-name = "yoke"
-name = "yoke-derive"
-name = "zerofrom"
-name = "zerofrom-derive"
-name = "zerovec"
-name = "zerovec-derive"

Another approach might be modifying revm-inspectors and have JsError not to be feature gated, so then reth-eth-types can import it without default features.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also disable default features for this on workspace level and then enable it when where we import this crate

crates/rpc/rpc-eth-types/Cargo.toml Outdated Show resolved Hide resolved
crates/rpc/rpc-eth-types/Cargo.toml Outdated Show resolved Hide resolved
@mattsse mattsse added the A-dependencies Pull requests or issues that are about dependencies label Aug 8, 2024
citizen-stig and others added 2 commits August 8, 2024 13:14
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@citizen-stig
Copy link
Contributor Author

let's also disable default features for this on workspace level and then enable it when where we import this crate

Do you mean for reth-rpc-eth-types?

reth-rpc-eth-types = { path = "crates/rpc/rpc-eth-types", default-features = false }

@citizen-stig
Copy link
Contributor Author

Also I cannot recommend less zepter

it can automatically detect and/or fix cases related to your last request.

crates/rpc/rpc/Cargo.toml Outdated Show resolved Hide resolved
@mattsse mattsse added this pull request to the merge queue Aug 8, 2024
Merged via the queue into paradigmxyz:main with commit 340b606 Aug 8, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Pull requests or issues that are about dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants