chore(core): organize deps using workspace.dependencies#2449
Conversation
|
I like this PR very much, thank you. Currently I am having one |
thanks, I needed to update |
Cargo.lock
Outdated
| dependencies = [ | ||
| "bitcoin_hashes", | ||
| "rand_core 0.6.4", | ||
| "rand_core 0.5.1", |
There was a problem hiding this comment.
thanks, I needed to update rand_core for bip39 crate
It actually downgrades it, can you please explain why?
There was a problem hiding this comment.
I didn’t explicitly request a downgrade. It happened because Cargo resolves dependencies based on the semver-compatible version range specified (e.g., v1...v5), and it selects the highest compatible version available by default. But if another dependency restricts it to a lower version, Cargo might resolve to that instead.
I believe this change doesn't break, change anything we can leave it until we no longer rely on rand_core 0.5.1 or we upgrade bip39 crate
There was a problem hiding this comment.
I believe this change doesn't break, change anything we can leave it until we no longer rely on rand_core 0.5.1 or we upgrade bip39 crate
We can also revert this to rand_core 0.6.4 as I think it won't cause problems, will it? cargo.lock will be relying less on rand_core 0.5.1 which makes it easier to remove it in the future. These left artifacts can persist over time as cargo might never resolve it on it's own if the dependency tree is complex.
Cargo.lock
Outdated
| "sha2 0.10.7", | ||
| "smallvec 1.6.1", | ||
| "syn 2.0.38", | ||
| "syn 1.0.95", |
There was a problem hiding this comment.
Also reason for this downgrade
There was a problem hiding this comment.
same reason as my first paragraph above
There was a problem hiding this comment.
#2449 (comment) As a general rule, always try to use the latest version if it's in the deps tree and if possible.
shamardy
left a comment
There was a problem hiding this comment.
This was much needed, thanks a lot! All above comments and the below one are non-blockers!
Cargo.toml
Outdated
| # using webpki-tokio to avoid rejecting valid certificates | ||
| # got "invalid certificate: UnknownIssuer" for https://ropsten.infura.io on iOS using default-features |
There was a problem hiding this comment.
this doesn't fit here as the feature webpki-tokio is mentioned in children .tomls
|
@mariocynicys @dimxy do you have any more review comments or iterations to go here? |
|
@shamardy i didn't attempt reviewing this anyway so i shouldn't be a blocker. that said, when i took a look i felt the only efficient way to review this is with a script 😂 - it checks that every workspace dep has the highest version out of the versions that showed up in the crates that used it. can try this on the weekend or something, but since this PR is benign, we don't have to wait for that and can merge it right away i guess. |
Checking cargo.lock was enough for me |
|
@borngraced why was this commit needed 01367f9 where it reverted some deps? I thought the deps were fine and I approved them before this commit. |
I initially didn't intend to update those deps but somehow got updated due to a package I updated so I was able to revert it... |
I thought the update wasn't bad. Some deps were removed from cargo.lock after the update, but some were added too. Can you please check which version you think is better before I do another review. |
This shouldn't be an issue or a blocker for now. These deps will be updated in toolchain upgrade PR(updated some already) The dep i updated was |
Had to check cargo.lock again and it's actually better now. Thanks |
* dev: (29 commits) fix(p2pk): validate expected pubkey correctly for p2pk inputs (#2408) chore(docs): update old urls referencing atomicdex or old docs pages (#2428) improvement(p2p): remove hardcoded seeds (#2439) fix(evm-api): find enabled erc20 token using platform ticker (#2445) chore(docs): add DeepWiki badge to README (#2463) chore(core): organize deps using workspace.dependencies (#2449) feat(db-arch): more dbdir to address_dir replacements (#2398) chore(build-artifacts): remove duplicated mm2 build artifacts (#2448) feat(pubkey-banning): expirable bans (#2455) fix(eth-balance-events): serialize eth address using AddrToString (#2440) chore(deps): remove base58 and replace it completely with bs58 (#2427) feat(tron): initial groundwork for full TRON integration (#2425) fix(UTXO): improve tx fee calculation and min relay fee handling (#2316) deps(timed-map): bump to 1.3.1 (#2413) improvement(tendermint): safer IBC channel handler (#2298) chore(release): complete v2.4.0-beta changelogs (#2436) fix(event-streaming): initial addresses registration in utxo balance streaming (#2431) improvement(watchers): re-write use-watchers handling (#2430) fix(evm): make withdraw_nft work in HD mode (#2424) feat(taproot): support parsing taproot output address types ...
* lr-swap-wip: (37 commits) fix custom token error name fix getting chain_id from protocol_data refactor (review): use dedicated large error cfg, add new fn to FromApiValueError, fix TODO, use experimental namespace for lr rpc, more Ticker alias feat(walletconnect): add WalletConnect v2 support for EVM and Cosmos (GLEECBTC#2223) feat(ibc-routing-part-1): supporting entire Cosmos network for swaps (GLEECBTC#2459) fix(test): fix HD Wallet message signing tests (GLEECBTC#2474) improvement(builds): enable static CRT linking for MSVC builds (GLEECBTC#2464) feat(wallet): implement HD multi-address support for message signing (GLEECBTC#2432) fix(p2pk): validate expected pubkey correctly for p2pk inputs (GLEECBTC#2408) chore(docs): update old urls referencing atomicdex or old docs pages (GLEECBTC#2428) improvement(p2p): remove hardcoded seeds (GLEECBTC#2439) fix(evm-api): find enabled erc20 token using platform ticker (GLEECBTC#2445) chore(docs): add DeepWiki badge to README (GLEECBTC#2463) chore(core): organize deps using workspace.dependencies (GLEECBTC#2449) feat(db-arch): more dbdir to address_dir replacements (GLEECBTC#2398) chore(build-artifacts): remove duplicated mm2 build artifacts (GLEECBTC#2448) feat(pubkey-banning): expirable bans (GLEECBTC#2455) fix(eth-balance-events): serialize eth address using AddrToString (GLEECBTC#2440) chore(deps): remove base58 and replace it completely with bs58 (GLEECBTC#2427) feat(tron): initial groundwork for full TRON integration (GLEECBTC#2425) ...
This enables us to organize multiple packages under a single workspace, share dependencies, etc
Compile time improvements
• Before:
cargo build --timingsshows 2.20 s• After: end-to-end workspace build is 1.24-58 s (≈ 28 – 44 % faster overall)