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

synth-bm: include it in the root workspace #12901

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mooori
Copy link
Contributor

@mooori mooori commented Feb 10, 2025

Closes #12887

Comment on lines +193 to +194
# Renaming since currently the name of an unpublished workspace member collides with `near-jsonrpc-client`. Once #12908 is resolved, the crate here should be used with its original name.
ext-near-jsonrpc-client = { version = "0.15.1", package = "near-jsonrpc-client" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By using a different name, it's possible to add near-jsonrpc-client from crates.io to the workspace dependencies. I think that's a slight improvement because it:

  • reduces the number of dependencies that cannot be inherited from the workspace
  • makes it more explicit that there are two different near-jsonrpc-client crates

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the amount of version conflicts make it not worth it, then using local near-jsonrpc-client is a better first step.

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 70.29%. Comparing base (fb95d7b) to head (8fa037e).

Files with missing lines Patch % Lines
benchmarks/synth-bm/src/account.rs 0.00% 3 Missing ⚠️
benchmarks/synth-bm/src/contract.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #12901       +/-   ##
===========================================
+ Coverage    1.73%   70.29%   +68.56%     
===========================================
  Files         675      857      +182     
  Lines      121457   175449    +53992     
  Branches   121457   175449    +53992     
===========================================
+ Hits         2108   123335   +121227     
+ Misses     119246    46990    -72256     
- Partials      103     5124     +5021     
Flag Coverage Δ
backward-compatibility 0.36% <ø> (?)
db-migration 0.36% <ø> (ø)
genesis-check 1.42% <ø> (ø)
linux 70.15% <0.00%> (+68.41%) ⬆️
linux-nightly 69.95% <0.00%> (?)
pytests 1.73% <ø> (ø)
sanity-checks 1.54% <ø> (ø)
unittests 70.13% <0.00%> (?)
upgradability 0.36% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mooori mooori changed the title synth-bm: inclue it in the root workspace synth-bm: include it in the root workspace Feb 11, 2025
@mooori mooori marked this pull request as ready for review February 11, 2025 17:42
@mooori mooori requested a review from a team as a code owner February 11, 2025 17:42
@mooori mooori requested review from wacban and removed request for wacban February 11, 2025 17:42
@mooori
Copy link
Contributor Author

mooori commented Feb 11, 2025

For cargo deny to pass, I had to add a bunch of crates to skip in deny.toml. @nagisa could you have a look if this is handled properly? Since I haven't touched nearcore's deny.toml before...

@mooori mooori requested a review from nagisa February 11, 2025 17:43
Comment on lines +142 to +155
{ name = "near-chain-configs", version = "=0.0.0" },
{ name = "near-config-utils", version = "=0.0.0" },
{ name = "near-crypto", version = "=0.0.0" },
{ name = "near-fmt", version = "=0.0.0" },
{ name = "near-jsonrpc-client", version = "=0.0.0" },
{ name = "near-jsonrpc-primitives", version = "=0.0.0" },
{ name = "near-parameters", version = "=0.0.0" },
{ name = "near-primitives", version = "=0.0.0" },
{ name = "near-primitives-core", version = "=0.0.0" },
{ name = "near-schema-checker-core", version = "=0.0.0" },
{ name = "near-schema-checker-lib", version = "=0.0.0" },
{ name = "near-schema-checker-macro", version = "=0.0.0" },
{ name = "near-stdx", version = "=0.0.0" },
{ name = "near-time", version = "=0.0.0" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't allow local crates at all. The order of priority is to allow the older external crates, then the external crate.

Copy link
Member

Choose a reason for hiding this comment

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

It'd be nice to have short comments on what's our main goal to use deny.toml. It took me a while to understand. Looks like the goal is "restrict using duplicate versions + deny some specific versions + allow multiple versions where it's unavoidable" and meaning of keywords "deny" and "skip" isn't obvious here.

Comment on lines +158 to +166
{ name = "base64", version = "=0.21.0" },
{ name = "http", version = "=0.2.12" },
{ name = "http-body", version = "=0.4.6" },
{ name = "hyper", version = "=0.14.28" },
{ name = "hyper-tls", version = "=0.5.0" },
{ name = "reqwest", version = "=0.11.17" },
{ name = "smart-default", version = "=0.6.0" },
{ name = "socket2", version = "=0.4.9" },
{ name = "winreg", version = "=0.10.1" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Try updating the crates to unify the dependencies before allowing them. I don't see any reason why we shouldn't be bumping our base64 or http related crates and situations like these are a perfect opportunity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include benchmarks/synth-bm into the root workspace
3 participants