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

chore: reexport bytes & bump version to 1.4 #1395

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Feb 16, 2023

This PR reexports bytes crate from reth-primitives crate and minimizes the number of instances of direct dependencies on bytes crate.

Why bytes crate version was upgraded to 1.4?

Why is bytes reexport needed?

  • To minimize the number of changes needed for the next upgrade.

Why bytes dependency remained in some crates?

  • Some crates do not have dependency on reth-primitives (rpc/ipc, rlp)
  • Some crates use main_codec (including reth-primitives) which generates the code with bytes::Buf import
    pub use #mod_flags_ident::#flags_ident;
    mod #mod_flags_ident {
    use bytes::Buf;
    use modular_bitfield::prelude::*;

    I've attempted generating a dynamic import path with proc-macro-crate, but it failed to cover all usages

NOTE: Possible merge conflicts with #1393

@rkrasiuk rkrasiuk added S-controversial This requires a heightened standard of review before it can be merged C-debt A section of code is hard to understand or change labels Feb 16, 2023
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.

can't remember if it was 1.3 or 1.4 that caused regression of the benchmarking job, IIRC it was 1.3 and we rolled back the cargo.lock bump.

let's see

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2023

Codecov Report

Merging #1395 (c13c825) into main (c41c343) will decrease coverage by 0.01%.
The diff coverage is 93.33%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1395      +/-   ##
==========================================
- Coverage   76.51%   76.51%   -0.01%     
==========================================
  Files         354      354              
  Lines       40022    40192     +170     
==========================================
+ Hits        30623    30751     +128     
- Misses       9399     9441      +42     
Flag Coverage Δ
integration-tests 22.67% <20.00%> (-0.10%) ⬇️
unit-tests 70.69% <93.33%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/net/discv4/src/config.rs 57.73% <ø> (ø)
crates/net/discv4/src/lib.rs 65.09% <ø> (ø)
crates/net/discv4/src/proto.rs 92.78% <ø> (+3.12%) ⬆️
crates/net/dns/src/tree.rs 85.57% <ø> (ø)
...rates/net/downloaders/src/test_utils/file_codec.rs 100.00% <ø> (ø)
crates/net/ecies/src/algorithm.rs 98.86% <ø> (ø)
crates/net/ecies/src/codec.rs 53.33% <ø> (ø)
crates/net/ecies/src/lib.rs 33.33% <ø> (ø)
crates/net/ecies/src/stream.rs 68.96% <ø> (ø)
crates/net/eth-wire/src/capability.rs 59.43% <ø> (ø)
... and 33 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rakita
Copy link
Collaborator

rakita commented Feb 16, 2023

I don't have any attachments to v1.4, I am fine to temporarily downgrade to v1.2 if there is a problem

@rkrasiuk
Copy link
Member Author

@rakita tried pinning revm to v1.2.1, but the produced downstream dep error with ethers 😬

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Supportive, let's actually open an issue on Bytes upstream so that it's tracked.

@gakonst gakonst merged commit f979c6c into main Feb 16, 2023
@gakonst gakonst deleted the rkrasiuk/bytes-reexport-and-version-bump branch February 16, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt A section of code is hard to understand or change S-controversial This requires a heightened standard of review before it can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants