fix(release): preserve Cargo.toml comments in create-release #421
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/create-release-preserve-cargo-comments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
just create-releasebumped the version withopen Cargo.toml | update package.version | to toml, which round-trips through nu's TOML serializer and drops every comment. The v0.6.0 release commit silently deleted 11 lines of feature-flag and dependency rationale (MAPPS-338/299/292/355); that deletion had to be reverted by hand on the release branch.This replaces the round-trip with a text-targeted
str replaceon the[package]version line (the firstversion = "..."in the file), so only that line changes and all comments survive. Verified against the current Cargo.toml: a simulated 0.5.0 -> 0.6.0 bump changes only line 5 and leaves every dependency version and comment untouched.package.json stays on the JSON round-trip: JSON has no comments to lose and it already produced a clean one-line diff.