✨ (VoteSecure P1/2) Build wbraid on stable Rust 1.96.0 - #3115
Conversation
Makes the packages/wbraid workspace build with the stable toolchain — cargo build, cargo check/test --all-targets all pass — keeping upstream's nightly behaviour available behind features: - vsc: the two nightly gates (stmt_expr_attributes, proc_macro_hygiene) are now enabled only with the custom-warnings feature, and the #[crate::warning] uses in statement, expression and file-module position are wrapped in cfg_attr(feature = "custom-warnings", ...) — stable rejects proc-macro attributes in those positions even though custom_warning_macro is a pass-through with its "on" feature off. Item-position uses compile on stable and are untouched. - vsc: the shuffle bench (#![feature(test)], a hard error on stable) is gated behind a new empty nightly-benches feature via required-features, so stable --all-targets builds skip it. - Cargo.lock: pinned primefield to 0.14.0-rc.9. Cargo's pre-release semver rules resolve p256 0.14.0-rc.9's "primefield 0.14.0-rc.9" requirement to the API-incompatible 0.14.0 final release, which does not compile against p256 rc.9 — the previously committed lock was broken this way. cargo clippy --workspace is clean on stable. --all-targets clippy still fails inside vsc's test modules and the shuffle_scaling example (unwrap_used and pedantic lints in test code, identical on nightly); that upstream state is left untouched. PROVENANCE.md documents the local modifications. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughChangesThe vsc crate now gates custom warnings and unstable attributes behind Stable Rust compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR limits nightly-only behavior to the appropriate feature paths while enabling stable builds, with no actionable merge-blocking risk remaining beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the packages/wbraid workspace to build successfully on stable Rust 1.96.0 while preserving upstream nightly-only behavior behind opt-in Cargo features. The core approach is to conditionally enable nightly language features only when explicitly requested and to exclude nightly-only benchmarks from stable --all-targets builds.
Changes:
- Wrapped
crates/vscnightly gates and non-item#[crate::warning(...)]usages behindcfg_attr(feature = "custom-warnings", ...)so stable builds avoid proc-macro attributes in unsupported positions. - Added a
nightly-benchesfeature and marked theshufflebench asrequired-features = ["nightly-benches"]to keep#![feature(test)]out of stable--all-targets. - Updated
packages/wbraid/Cargo.lockto pinprimefieldto0.14.0-rc.9to avoid a pre-release resolution mismatch.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/wbraid/PROVENANCE.md | Documents the stable-toolchain compatibility changes and rationale. |
| packages/wbraid/crates/vsc/src/zkp/shuffle.rs | Gates statement/expression-position custom warning attributes behind custom-warnings. |
| packages/wbraid/crates/vsc/src/utils/symm.rs | Gates statement-position custom warning attributes behind custom-warnings. |
| packages/wbraid/crates/vsc/src/lib.rs | Makes nightly feature gates conditional on custom-warnings; gates module-level warning attribute. |
| packages/wbraid/crates/vsc/src/groups/ristretto255/group.rs | Gates statement-position custom warning attribute behind custom-warnings. |
| packages/wbraid/crates/vsc/src/groups/p256/group.rs | Gates statement-position custom warning attribute behind custom-warnings. |
| packages/wbraid/crates/vsc/src/dkgd/recipient.rs | Gates statement-position custom warning attributes behind custom-warnings. |
| packages/wbraid/crates/vsc/src/dkgd/mod.rs | Gates module-position custom warning attribute behind custom-warnings. |
| packages/wbraid/crates/vsc/Cargo.toml | Adds nightly-benches and requires it for the shuffle bench target. |
| packages/wbraid/crates/vsc/benches/shuffle.rs | Updates bench run instructions to use --features nightly-benches. |
| packages/wbraid/Cargo.lock | Pins primefield rc version and records an unused patch entry written by Cargo. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
No logic change, only cargo fmt.
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped to stable-build compatibility (feature-gating nightly-only code paths and a lockfile fix) without altering runtime logic.
Review details
- Files reviewed: 57/60 changed files
- Comments generated: 0 new
- Review effort level: Lite
The only leftover is vsc errors, which is a vendored fork, so we leave it as is.
There was a problem hiding this comment.
🟡 Changes recommended
ProtocolInfo::to_xml currently emits unescaped XML element content, which can produce invalid XML for caller-provided strings (e.g., sid) containing <, > or &.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 68/71 changed files
- Comments generated: 1
- Review effort level: Lite
| let mut element = |tag: &str, value: &str| { | ||
| out.push_str(&format!(" <{tag}>{value}</{tag}>\n")); | ||
| }; |
Parent issue: https://github.com/sequentech/meta/issues/12886
Makes the packages/wbraid workspace build with the stable toolchain — cargo build, cargo check/test --all-targets all pass — keeping upstream's nightly behaviour available behind features:
cargo clippy --workspace is clean on stable. --all-targets clippy still fails inside vsc's test modules and the shuffle_scaling example (unwrap_used and pedantic lints in test code, identical on nightly); that upstream state is left untouched.
PROVENANCE.md documents the local modifications.
Summary by CodeRabbit
Build Improvements
Documentation