-
Notifications
You must be signed in to change notification settings - Fork 44
refactor: shared workspace dependencies #2440
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors how shared dependencies are managed by moving critical libraries to the workspace level to reduce build times and improve caching. Key changes include converting many Cargo.toml dependency declarations to use workspace versions, adjusting feature sets for some dependencies, and refactoring the Open API code generation logic in the build script.
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
mithril-client/Cargo.toml | Updated dependency declarations to use workspace versions |
mithril-client-wasm/Cargo.toml | Refactored dependency declarations to use workspace versions |
mithril-client-cli/Cargo.toml | Converted dependencies to workspace versions with updated features |
mithril-aggregator/Cargo.toml | Adjusted dependency configurations (notably reqwest features) |
internal/signed-entity/, internal/mithril--*/Cargo.toml | Updated dependency declarations for shared libraries |
internal/mithril-build-script/src/open_api.rs | Made Open API file listing public and generalized a file reading function |
Cargo.toml | Added a workspace dependencies section with specific versions |
examples/*/Cargo.toml | Refactored dependency declarations in example projects |
Comments suppressed due to low confidence (1)
mithril-aggregator/Cargo.toml:41
- The new reqwest dependency configuration now specifies a different set of features (e.g., 'default', 'gzip', 'zstd', 'deflate', 'brotli') compared to the previous ('json', 'stream'). Please verify that these changes are aligned with the intended behavior of the aggregator.
reqwest = { workspace = true, features = [
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6af2566
to
20bae7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mithril-stm/CHANGELOG.md
Outdated
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. | |||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |||
|
|||
## 0.3.yy (dd-mm-2025) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated before merging 🙂
mithril-stm/CHANGELOG.md
Outdated
- Remove the build script and deprecate `batch-verify-aggregate` feature as the code behind this feature is now | ||
compatible with WASM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove the build script and deprecate `batch-verify-aggregate` feature as the code behind this feature is now | |
compatible with WASM. | |
- Removed the build script and deprecated `batch-verify-aggregate` feature as the code behind this feature is now | |
compatible with WASM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In order to reduce number of unnecessary rebuild when developping. Shared dependencies are: - used in lot of crates (tokio, chrono, clap, ...) - using derive features (serde, clap, ...) - used in few crates but high in the dependency tree (ran_chore, rayon, strum, ...)
20bae7a
to
1959e62
Compare
…` feature As the code gated by the feature can now be compiled when targeting WASM.
as it's only needed for openapi validation
name = "client-cardano-database-v2" -version = "0.0.4" +version = "0.0.5" * client-cardano-database from `0.1.29` to `0.1.30` * client-cardano-stake-distribution from `0.1.11` to `0.1.12` * client-cardano-transaction from `0.1.21` to `0.1.22` * client-mithril-stake-distribution from `0.2.9` to `0.2.10` * mithril-build-script from `0.2.19` to `0.2.20` * mithril-cli-helper from `0.0.3` to `0.0.4` * mithril-doc from `0.1.20` to `0.1.21` * mithril-metric from `0.1.10` to `0.1.11` * mithril-persistence from `0.2.50` to `0.2.51` * mithril-resource-pool from `0.0.2` to `0.0.3` * mithril-signed-entity-lock from `0.0.2` to `0.0.3` * mithril-signed-entity-preloader from `0.0.2` to `0.0.3` * mithril-aggregator from `0.7.39` to `0.7.40` * mithril-client-cli from `0.11.14` to `0.11.15` * mithril-client-wasm from `0.8.7` to `0.8.8` * mithril-client from `0.11.21` to `0.11.22` * mithril-common from `0.5.23` to `0.5.24` * mithril-relay from `0.1.39` to `0.1.40` * mithril-signer from `0.2.238` to `0.2.239` * mithril-stm from `0.3.43` to `0.3.44` * mithril-aggregator-fake from `0.4.5` to `0.4.6` * mithril-end-to-end from `0.4.80` to `0.4.81` * [js] mithril-client-wasm from `0.8.7` to `0.8.8`
1959e62
to
d28614e
Compare
Content
This PR tries to reduce build time, especially when switching between crates, by moving the most critical or shared dependencies to the workspace directly.
It also:
mithril-stm
as everything now compile to wasm without needing to gatebatch_verify
.batch-verify-aggregates
batch-verify-aggregates
is now deprecated and cfg gate that use it should be removed, then we will be able to remove the featuremithril-build-script
open api code generators: to separate the part where we find the open api spec files and the part that generate code based on themmithril-common
:serde_yaml
optional: it's only needed forapispec
test tool and this crate is deprecated (Pre-submit checklist
Comments
mithril-stm
always recompile if we alternate between aggregator and signer, more work is needed or maybe a tool like cargo-hakariIssue(s)
Closes #2430