-
Notifications
You must be signed in to change notification settings - Fork 697
refactor: centralize dependencies and feature-gate stacks-common #6238
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
refactor: centralize dependencies and feature-gate stacks-common #6238
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.
Looks good!
About the http-parser flag, I generally prefer keeping the number of feature flags to a minimum for simplicity 😊
That said, if we were to remove this flag, do you have a specific alternative in mind?
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 the end the comment you made convinced me to remove it. The feature was small, and didn't add additional dependencies to the mix, no need to find a workaround :) |
7d63003
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6238 +/- ##
===========================================
- Coverage 81.91% 81.80% -0.11%
===========================================
Files 546 545 -1
Lines 347235 347218 -17
Branches 323 323
===========================================
- Hits 284441 284057 -384
- Misses 62786 63153 +367
Partials 8 8
... and 55 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Description
This PR is the first of two (?) aiming at modularizing the clarity crate to enable a lightweight serialization/deserialization mode AND building on Wasm32 target, in two flavors:
wasm-web
, with js support for the entire VMwasm-deterministic
for deterministc environments like CosmWasm, where rand is not supported.This initial step focuses on preparing the workspace and refactoring stacks-common and feature-gate a couple of non-necessary features in stacks-common.
The key changes are:
Cargo.toml
under[workspace.dependencies]
. Some of those dependencies are only used by the stacks-common create in this PR, but will be used by theclarity
create in the following.nix
optional instacks-common
via newctrlc-handler
feature flag.time
from the dependencies, as it's not currently used (directly at least).chrono
so to prevent pulling in additional dependencies that don't compile on CosmWasm and we don't use.Extra, not mandatory (open to move in another PR):
chrono
to0.4.41
from0.4.19
to fix a known (minor for us) vulnerability https://osv.dev/vulnerability/RUSTSEC-2020-0159. We only use chrono for adding the timestamp to the logs.This change is fully backward compatible. The default features have been updated to preserve the existing behavior, so no changes are required for downstream crates.
Super open to suggestions for improvements/gating additional features!
Applicable issues
clarity
to enable lightweight serialization crate #6236Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml