Repository navigation
Fill in deprecation versions at release - #1984
Merged
spacebear21 merged 1 commit intoOct 16, 2026
Merged
Conversation
A deprecation's `since` version is written before anyone knows which release will ship it, so it can end up wrong. Write the placeholder 0.0.0-unreleased instead and let bump.sh replace it with the crate's version, next to where it renames the changelog's Unreleased section. check-invariants fails if a crate being released still has one. rust-bitcoin uses "TBD" for this, but rustc reads that as a future deprecation and does not warn callers until it is replaced. Strings like "Unreleased" do warn, but clippy's deprecated_semver lint rejects them. A pre-release version passes clippy and warns as usual. UniFFI has no deprecation attribute, so payjoin-ffi states deprecations in doc comments. bump.sh fills `since <crate> 0.0.0-unreleased` there with that crate's version, so the bindings can name the payjoin release that deprecated an item.
Collaborator
Coverage Report for CI Build 38940097324Coverage remained the same at 87.475%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
spacebear21
approved these changes
Oct 16, 2026
spacebear21
left a comment
Collaborator
There was a problem hiding this comment.
utACK
There is an existing deprecated flag on SenderBuilder::new that lists 1.0.1 as the since version. That version doesn't exist though, should we update that to 1.1.0 in this PR?
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A deprecation's
sinceversion gets written before anyone knows which release will ship it (#1971 discussion). This has PRs write0.0.0-unreleasedinstead.bump.shfills in the crate's version in the release PR, andcheck-invariants.shfails if a crate being released still has one.rust-bitcoin does this with
since = "TBD"(CONTRIBUTING.md). rustc readsTBDas a deprecation in a future version and only warns under the allow-by-defaultdeprecated_in_futurelint, so callers would hear nothing until the release. Other words likeUnreleaseddo warn, but clippy'sdeprecated_semverlint rejects them. A pre-release version passes clippy and warns as usual, and#[allow(deprecated)]covers it both before and after the bump.UniFFI doesn't carry deprecation attributes into the bindings (mozilla/uniffi-rs#1219), so payjoin-ffi writes deprecations in doc comments.
bump.shreplacessince <crate> 0.0.0-unreleasedthere with that crate's version, which lets the bindings name the payjoin release that deprecated something. Each bump only edits its own crate'ssrc, so a payjoin bump leaves the bindings' notes for the payjoin-ffi bump.I tested it by putting placeholders in a scratch checkout, in
payjoin/src(the attribute and the prose form) and inpayjoin-ffi/src(bothsince payjoinandsince payjoin-ffi). Then I ranbump.sh --no-lockfor each crate. Every placeholder got the right version,payjoindidn't matchpayjoin-ffi, andcheck-invariants.shflagged the placeholders before the bump. There's no test harness for these scripts, so none is included.Reviewer: @spacebear21
Local AI review done (Codex), no findings.
Disclosure: co-authored by Claude Code