build: make the workspace lockfile vendorable with --locked - #4631
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe changes update Cargo dependency sources. The workspace patches ChangesCargo dependency updates
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change aligns Cargo dependency sources so the workspace lockfile can be vendored with --locked. The intended dependency resolutions are present, with no remaining merge-blocking risk identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🕓 Queued for automated review — 59th in line, estimated start in ~49 h (commit 1e8f252)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v4.2-dev #4631 +/- ##
============================================
- Coverage 87.71% 87.33% -0.38%
============================================
Files 2794 2795 +1
Lines 363048 365178 +2130
============================================
+ Hits 318433 318933 +500
- Misses 44615 46245 +1630
🚀 New features to boost your workflow:
|
|
Empirical check of the Setup. Built 1. The package's own mocha suite (excluded from the PR matrix, so run locally): 235 passing / 533 pending on both builds, with byte-identical lists of executed test titles. 2. Exhaustive input-kind sweep at the only surface where the two branches can differ: an untyped deserialization target (
So the complete delta is: a typed array placed where a JSON-schema fragment belongs used to be rejected at the boundary and is now decoded as bytes. Nothing that decoded before decodes differently. 3. Does the newly accepted input get anywhere? With validation on ( 4. Serializer: no behavioural hunk; 5. Same semantics already live: Full-matrix 🤖 Posted autonomously by Claude on behalf of pasta. |
cargo vendor --locked refused the workspace with two dual-source packages: serde-wasm-bindgen came from the QuantumExplorer fork (wasm-dpp) and the dashpay fork (wasm-sdk, wasm-dpp2) at once, and versioned-feature-core 1.0.0 came from crates.io (via grovedb-version) and from git (rs-platform-version). Offline build systems that vendor the workspace, such as Dash Core's depends packaging of the C++ embedding crate, cannot proceed past that error. Point wasm-dpp at the dashpay fork, which is the QuantumExplorer branch plus the uint8array fix and the current wasm-bindgen pin, and point rs-platform-version at the crates.io release of versioned-feature-core, which is the same commit the git pin held (the repo's only substantive commit, published as 1.0.0 two days after the pin was written; src/lib.rs is byte-identical). The lockfile loses the two duplicate entries and nothing else changes. Validated: cargo check for platform-version, dash-platform-queries, dash-sdk, rs-sdk-ffi and drive-abci on the host; wasm-dpp, wasm-sdk and wasm-dpp2 check for wasm32-unknown-unknown; the tests-rs-workspace transport-free guards still pass; cargo vendor --locked now succeeds (829 crates).
05927f9 to
1e8f252
Compare
…crate dashpay/platform#4633 rebuilds the Platform CXX bindings as a thin bridge over dash-sdk: the SDK owns DAPI transport, retries and proof verification, and Core supplies endpoints, quorum keys, its ChainLock height and wallet signatures. The crate is an ordinary workspace member now, so the package vendors from the workspace root (the lockfile made vendorable by dashpay/platform#4631), builds with -p dash-platform-cxx, and installs the header tree the crate's build.rs stages plus the static archive; the nested standalone manifest and install.sh are gone with the old design. mbedtls leaves depends: the SDK carries its own TLS stack (rustls with the system trust store), so Core no longer links a TLS library for Platform. The vendoring config gains the workspace's git sources. Validated on aarch64-apple-darwin: make -C depends PLATFORM_GUI=1 platform_cxx vendors 840 crates (150 MB archive) and builds the crate offline in 3 minutes; the staged prefix carries include/dash/platform/{ffi.h,signer.h}, include/rust/cxx.h and lib/libdash_platform_cxx.a. The knob-off package set is unchanged.
|
I've confirmed this is safe; nothing changes really, there are only 2 changes;
|
Keep the workspace bincode alias and the GroveDB pin from this branch; take the crates.io versioned-feature-core from #4631.
…crate dashpay/platform#4633 rebuilds the Platform CXX bindings as a thin bridge over dash-sdk: the SDK owns DAPI transport, retries and proof verification, and Core supplies endpoints, quorum keys, its ChainLock height and wallet signatures. The crate is an ordinary workspace member now, so the package vendors from the workspace root (the lockfile made vendorable by dashpay/platform#4631), builds with -p dash-platform-cxx, and installs the header tree the crate's build.rs stages plus the static archive; the nested standalone manifest and install.sh are gone with the old design. mbedtls leaves depends: the SDK carries its own TLS stack (rustls with the system trust store), so Core no longer links a TLS library for Platform. The vendoring config gains the workspace's git sources. Validated on aarch64-apple-darwin: make -C depends PLATFORM_GUI=1 platform_cxx vendors 840 crates (150 MB archive) and builds the crate offline in 3 minutes; the staged prefix carries include/dash/platform/{ffi.h,signer.h}, include/rust/cxx.h and lib/libdash_platform_cxx.a. The knob-off package set is unchanged.
…crate dashpay/platform#4633 rebuilds the Platform CXX bindings as a thin bridge over dash-sdk: the SDK owns DAPI transport, retries and proof verification, and Core supplies endpoints, quorum keys, its ChainLock height and wallet signatures. The crate is an ordinary workspace member now, so the package vendors from the workspace root (the lockfile made vendorable by dashpay/platform#4631), builds with -p dash-platform-cxx, and installs the header tree the crate's build.rs stages plus the static archive; the nested standalone manifest and install.sh are gone with the old design. mbedtls leaves depends: the SDK carries its own TLS stack (rustls with the system trust store), so Core no longer links a TLS library for Platform. The vendoring config gains the workspace's git sources. Validated on aarch64-apple-darwin: make -C depends PLATFORM_GUI=1 platform_cxx vendors 840 crates (150 MB archive) and builds the crate offline in 3 minutes; the staged prefix carries include/dash/platform/{ffi.h,signer.h}, include/rust/cxx.h and lib/libdash_platform_cxx.a. The knob-off package set is unchanged.
…crate dashpay/platform#4633 rebuilds the Platform CXX bindings as a thin bridge over dash-sdk: the SDK owns DAPI transport, retries and proof verification, and Core supplies endpoints, quorum keys, its ChainLock height and wallet signatures. The crate is an ordinary workspace member now, so the package vendors from the workspace root (the lockfile made vendorable by dashpay/platform#4631), builds with -p dash-platform-cxx, and installs the header tree the crate's build.rs stages plus the static archive; the nested standalone manifest and install.sh are gone with the old design. mbedtls leaves depends: the SDK carries its own TLS stack (rustls with the system trust store), so Core no longer links a TLS library for Platform. The vendoring config gains the workspace's git sources. Validated on aarch64-apple-darwin: make -C depends PLATFORM_GUI=1 platform_cxx vendors 840 crates (150 MB archive) and builds the crate offline in 3 minutes; the staged prefix carries include/dash/platform/{ffi.h,signer.h}, include/rust/cxx.h and lib/libdash_platform_cxx.a. The knob-off package set is unchanged.
Issue being fixed or feature implemented
cargo vendor --lockedrefuses the workspace onv4.2-dev:and, once that is resolved, the same for
versioned-feature-core 1.0.0(crates.io throughgrovedb-version, git throughrs-platform-version). Offline build systems that vendor the workspace cannot get past this. Dash Core's depends packaging of the C++ embedding crate (the follow-up to this PR, see dashpay/dash#7512) is the first consumer that needs it.What was done?
wasm-dppnow pinsserde-wasm-bindgento thedashpayfork likewasm-sdkandwasm-dpp2already do. That branch is theQuantumExplorerbranch plus theUint8Arrayfix and the currentwasm-bindgenpin, so nothing changes forwasm-dppbeyond the source.rs-platform-versionnow depends onversioned-feature-corefrom crates.io instead of the dashpay git repo. The git pin was the repo's only substantive commit, published as 1.0.0 two days after the pin was written; the two trees differ only in cargo'sCargo.tomlnormalization on publish.grovedb-versionalready depended on the crates.io release, so this collapses two identical copies into one. (Earlier revision used a workspace[patch]table for this; the manifest edit is the direct fix and does not rely on a root-level override.)Cargo.lockloses the two duplicate entries.Why the two source changes are safe
serde-wasm-bindgen. The dashpay branch is a descendant of the QuantumExplorer branch (git merge-base --is-ancestorconfirms), adding two commits. Their source diff:is_human_readablebecomes a per-deserializer flag with afrom_value_jsonentry point. The default staysfalse, which is the value the QuantumExplorer branch hardcoded, andfrom_value(the only entry pointwasm-dppuses) still takes that default. The serializer side only gains a setter;Serializer::json_compatible()is unchanged.deserialize_anygains anas_bytes()arm so aUint8Array/ArrayBufferbecomesvisit_byte_buf. On the QuantumExplorer branch that input fell through every arm (typed arrays are notArray::is_array, and they carrySymbol.iterator, so the object arm rejects them) and returned aninvalid_typeerror. The change turns an error into a value; no input that deserialized before deserializes differently now. Upstreamserde-wasm-bindgen0.6.5 has the same arm, so this brings the fork in line with upstream.wasm-dppdoes not reach the changed arm: its JS→platform_valuepath stringifies through JSON (utils.rs::with_serde_to_platform_value), and itsfrom_valuetargets are typed option structs andserde_json::Valuemaps, where a typed array errors both before and after (serde_json::Valuehas no bytes visitor).wasm-bindgenpin the fork carries (=0.2.108) is the pinwasm-dppalready declares; the lockfile had 0.2.108 before and after.Why they differed:
wasm-dpptook the QuantumExplorer branch in 2023 (#809) for the non-human-readable mode;wasm-sdkmoved from upstream 0.6.5 to the dashpay branch in 2025 (#2850) because it needed both that mode and the typed-array fix, and the new branch was cut from the old one.wasm-dppwas never moved along. Drift, not a deliberate split.versioned-feature-core.rs-platform-versionpinned the git repo on 2024-07-10 (#1938), the day the crate's only real commit landed; QuantumExplorer published 1.0.0 to crates.io on 2024-07-12. The git rev the lockfile held is that same tip commit.src/lib.rsis byte-identical between the two; the only difference is cargo'sCargo.tomlnormalization on publish.grovedb-versionalready depends on the crates.io release, sodrive-abciwas already compiling one copy from each source. Switching the manifest to the published release collapses them onto one with no source change.How Has This Been Tested?
cargo check --lockedforplatform-version,dash-platform-queries,dash-sdk,rs-sdk-ffi,drive-abci.cargo check --locked --target wasm32-unknown-unknownforwasm-dpp,wasm-sdk,wasm-dpp2.tests-rs-workspacetransport-free guards (hyper/rustls/towerabsent from the verifier trees) still pass.cargo vendor --lockednow succeeds (829 crates).@dashevo/wasm-dpp's own JS tests are not in the PR matrix (nightly/workflow_dispatchonly).Build JScompiled it and its consumers' suites ran on top of the built artifact; aworkflow_dispatchrun of the full matrix on this branch is linked below.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit