Skip to content

fix: cargo upgrade script and Rust dependency updates#257

Merged
SimplicityGuy merged 1 commit intomainfrom
fix/cargo-upgrade-script-and-deps
Apr 1, 2026
Merged

fix: cargo upgrade script and Rust dependency updates#257
SimplicityGuy merged 1 commit intomainfrom
fix/cargo-upgrade-script-and-deps

Conversation

@SimplicityGuy
Copy link
Copy Markdown
Owner

Summary

  • Script fix: update-project.sh --major was silently failing to upgrade Rust dependencies because it invoked cargo-upgrade (binary) instead of cargo upgrade (subcommand) — the binary doesn't accept --incompatible flags when called directly, and 2>/dev/null hid the error
  • Dependency updates: Applied the major upgrades that the script should have been doing, including sha2 0.10→0.11 (the upgrade in Dependabot PR deps(deps): bump sha2 from 0.10.9 to 0.11.0 #238)
  • sha2 0.11 migration: finalize() output no longer implements LowerHex, so replaced all format!("{:x}", hasher.finalize()) with hex::encode(hasher.finalize()) across 9 call sites

Rust dependency bumps

Crate Old New
sha2 0.10 0.11
tokio 1.49 1.50
lapin 4.0 4.4
clap 4.5 4.6
tempfile 3.25 3.27
proptest 1.10 1.11
serial_test 3.3.1 3.4.0

Test plan

  • cargo check — compiles cleanly
  • cargo test — 14 passed
  • cargo clippy -- -D warnings — no warnings
  • cargo fmt — formatted
  • shellcheck + shfmt — script passes
  • All pre-commit hooks pass
  • Supersedes Dependabot PR deps(deps): bump sha2 from 0.10.9 to 0.11.0 #238 (sha2 bump) — can be closed after merge

🤖 Generated with Claude Code

Script fix (scripts/update-project.sh):
- Fix cargo-upgrade invocation: use "cargo upgrade" (subcommand) instead of
  "cargo-upgrade" (direct binary) — the binary does not accept flags like
  --incompatible when called directly, causing silent failure
- Change 2>/dev/null to 2>&1 so errors are visible instead of swallowed
- Use boolean flag for detection, invoke via cargo subcommand for execution

Dependency updates (via cargo upgrade --incompatible allow):
- sha2: 0.10 → 0.11 (breaking: finalize() output no longer implements LowerHex)
- tokio: 1.49 → 1.50
- lapin: 4.0 → 4.4
- clap: 4.5 → 4.6
- tempfile: 3.25 → 3.27
- proptest: 1.10 → 1.11
- serial_test: 3.3.1 → 3.4.0

sha2 0.11 migration:
- Replace format!("{:x}", hasher.finalize()) with hex::encode(hasher.finalize())
  across all 9 call sites in 6 source files and 3 test files
- Add hex import to test files that use sha2 directly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (chromium)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (firefox)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit - iPhone 15)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit - iPad Pro 11)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@SimplicityGuy SimplicityGuy merged commit 42fcd33 into main Apr 1, 2026
57 checks passed
@SimplicityGuy SimplicityGuy deleted the fix/cargo-upgrade-script-and-deps branch April 1, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant