Skip to content

chore(deps): lock email-encoding 0.4.3 to match lettre 0.11.24 - #11

Merged
vheins merged 1 commit into
rustasea:masterfrom
gitfromwildan:fix/lockfile-email-encoding
Nov 20, 2026
Merged

vheins merged 1 commit into
rustasea:masterfrom
gitfromwildan:fix/lockfile-email-encoding

Conversation

@gitfromwildan

Copy link
Copy Markdown
Contributor

Summary

Cargo.lock on master is inconsistent. It pins lettre 0.11.24 together with email-encoding 0.4.2, but lettre 0.11.24 requires email-encoding ^0.4.3. This PR locks email-encoding 0.4.3: one entry, two lines.

Effect of the inconsistency

  • Any cargo command without --locked rewrites Cargo.lock, so every checkout ends up with a modified lockfile after the first build.
  • cargo metadata --locked (and any other --locked build) fails on master with "cannot update the lock file ... because --locked was passed".
  • CI does not catch it because no job passes --locked; each run resolves email-encoding 0.4.3 on the fly.

The lettre bump came in with #8 (chore(deps): bump lettre to 0.11.24 for RUSTSEC-2026-0560..0565), which updated the lettre entry but not its dependency.

Testing

  • cargo metadata --locked passes with this change and fails without it.
  • cargo test -p rustasea-mail --features smtp --locked passes (lettre is only linked behind that feature): 5 suites, 18 tests.
  • cargo audit and cargo deny check pass.
  • email-encoding 0.4.3 declares rust-version = 1.85, under the workspace MSRV of 1.88.

Not run: the full workspace test suite, since the change is one transitive dependency behind an opt-in feature.

Possible follow-up

Passing --locked in the CI jobs would turn this kind of drift into a failing check. I left that out because it changes the workflow rather than fixing the lockfile.

@vheins, could you review this?

The lockfile pinned lettre 0.11.24 together with email-encoding 0.4.2, but
lettre 0.11.24 requires email-encoding ^0.4.3. The lockfile was therefore
inconsistent: any cargo command rewrote it, and --locked builds failed.
CI did not catch it because no job passes --locked.
@github-actions
github-actions Bot requested a review from vheins November 19, 2026 00:37
@vheins

vheins commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Approving. Verified statically (no cargo available in this environment):

The inconsistency is real and pre-existing. Base Cargo.lock has one email-encoding entry (0.4.2) referenced only by lettre 0.11.24 via a bare name, but lettre 0.11.24 requires email-encoding ^0.4.3; 0.4.2 does not satisfy that requirement, so --locked builds would fail and any plain cargo command rewrites the lockfile. This was introduced by PR #8, which bumped lettre's version+checksum without re-resolving its dependency subtree.

The fix is minimal and correct. The diff touches only two lines in Cargo.lock (the email-encoding version 0.4.2 → 0.4.3 and its checksum). After the change there is exactly one email-encoding entry (0.4.3), its only consumer (lettre) resolves to it unambiguously, and its own dependencies (base64 0.23.1, memchr) are already in the lock at satisfying versions — so the manual edit matches what cargo update --precise 0.4.3 would produce. The new checksum (9f690ae2…f71004, 64 hex chars) matches the published crates.io value; source line and dependencies are unchanged.

MSRV is fine. email-encoding 0.4.3 declares rust-version 1.85, well below the workspace MSRV 1.88 (Cargo.toml [workspace.package] rust-version), which the msrv CI job pins.

One note for later (not blocking): no CI job passes --locked/--frozen (.github/workflows/ci.yml runs cargo xtask ci, cargo fetch, and cargo test --workspace without it), which is why this drift surfaced only after the lettre bump. Adding a --locked check job would catch this class of lockfile inconsistency automatically. The PR's two --locked command claims are author-run and not reproducible here, but they are consistent with the static analysis.

@vheins
vheins merged commit 661c82c into rustasea:master Nov 20, 2026
6 checks passed
@gitfromwildan
gitfromwildan deleted the fix/lockfile-email-encoding branch November 20, 2026 05:56
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.

2 participants