Bump python, javascript, and C# bindings for payjoin-1.0.0 - #1831
Conversation
Coverage Report for CI Build 32904152057Coverage remained the same at 86.718%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
3d4cb41 to
31390b0
Compare
|
How comfortable are you dropping experimental tag on bound targets before payjoin-ffi 1.0? Is that ~production quality in your view then? |
I am comfortable dropping them from the dart bindings since those are already being used in production, but on second thought I agree we should keep it at least on the Javascript bindings until we get proper async support there. |
31390b0 to
1e871f6
Compare
Release tags for the language bindings uniformly carry the full
{version}+payjoin-{version} string, where the build metadata names
the wrapped payjoin core release. Registries that cannot represent
SemVer build metadata (npm, PyPI, NuGet package identity) publish the
bare version, so when the packed version carries no metadata, compare
the tag with its metadata stripped. A packed version that does carry
metadata, like a Dart package, must still match the tag exactly.
1e871f6 to
997287c
Compare
Give the package its own semantic version instead of deriving it from the payjoin-ffi crate, following the per-language versioning convention: each package keeps independent semver with the wrapped payjoin core version as build metadata where the registry supports it. PyPI rejects PEP 440 local version labels (the + part), so the package publishes the bare version and records that 0.2.0 wraps payjoin-1.0.0, the first stable payjoin release, in the changelog. 0.2.0 succeeds 0.1.0.dev0, the only version previously published to PyPI, and is a minor bump because the API is not backwards compatible with it. The version now lives in pyproject.toml; setup.py no longer reads Cargo.toml, which drops the toml build and dev dependencies.
Bump the package from 0.1.1, the last version published to npm, to
0.2.0 for the release wrapping payjoin-1.0.0. The API has changed
incompatibly since 0.1.1 (session persister rework, typestate and
error overhauls, web environment support), so this is a 0.x minor
bump.
The language bindings follow a {version}+payjoin-{version} convention
where the build metadata names the wrapped payjoin core release, but
npm strips build metadata from published versions, so package.json
carries the bare version and records the full 0.2.0+payjoin-1.0.0 in
a releaseTag field for traceability.
Give the package its own semantic version instead of tracking the payjoin-ffi crate version, following the per-language convention where SemVer build metadata names the wrapped payjoin core release: 0.1.0+payjoin-1.0.0 packages payjoin 1.0.0, the first stable payjoin release. Drop the -preview.N suffix since 0.x already conveys a pre-stable API. Resetting below the published 0.24.0-preview.1 avoids continuing a number that named the previously wrapped payjoin core version, which would read as confusing under the new scheme. The old versions must be unlisted on nuget.org so floating installs resolve the new line. NuGet keeps build metadata in the nuspec but strips it from the .nupkg filename and ignores it for version comparison, so the release tag payjoin-csharp-0.1.0+payjoin-1.0.0 is compared against the packed artifact with the metadata stripped.
997287c to
830845e
Compare
| compare_version="$tag_version" | ||
| # A packed version without build metadata comes from a registry | ||
| # that cannot represent it, so the tag is compared with its | ||
| # metadata stripped; a packed version that carries metadata must | ||
| # match the tag exactly. | ||
| if [[ $VERSION != *+* ]]; then | ||
| compare_version="${tag_version%%+*}" | ||
| fi |
There was a problem hiding this comment.
This feels a bit clunky but it seemed like the most straightforward way to enforce uniformity across tags (payjoin-{lang}-{version}+payjoin-{version}) despite some package managers not supporting the + syntax.
Open to suggestions for better ways to structure the release tags. The current approach took inspiration from https://gitlab.com/ark-bitcoin/bark-ffi-bindings/-/blob/master/RELEASE.md?ref_type=heads#versioning-per-language
| <IsPackable>true</IsPackable> | ||
| <PackageId>Payjoin</PackageId> | ||
| <Version>0.24.0-preview.1</Version> | ||
| <Version>0.1.0+payjoin-1.0.0</Version> |
There was a problem hiding this comment.
Do you see any confusion with csharp always being a version behind? I know this is not technically the most correct semver but it seems annoying to always have this one minor version behind the others
There was a problem hiding this comment.
The way bark does versioning is: all downstream languages track the ffi version, so they're all in sync.
IMO there are good reasons to keep each language's version independent. There may be releases affecting only one language, like if a particular bindings generator e.g. uniffi-dart comes out with an important fix. That doesn't warrant making releases in all the other languages just to keep the versions in sync. And in the future when we add support for a new language we probably want to start it at 0.1.0 anyway while it's still being experimented with.
Prepare the remaining binding releases wrapping payjoin-1.0.0 (dart already shipped as
0.2.2+payjoin-1.0.0), one commit per package. Thepayjoin-fficrate version is untouched; each language now keeps its own semver following the bark-ffi-bindings convention of{version}+payjoin-{version}build metadata, applied where the registry supports it:pyproject.tomlinstead of being derived from the crate version bysetup.py(which drops thetomlbuild/dev dependencies). PyPI rejects PEP 440 local version labels, so the package publishes the bare version and the wrapped payjoin core release is recorded in the changelog. 0.2.0 succeeds0.1.0.dev0, the only version previously on PyPI, as a minor bump since the API is not backwards compatible with it. Release tag:payjoin-python-0.2.0+payjoin-1.0.0.package.jsoncarries the bare version plus areleaseTagfield recording0.2.0+payjoin-1.0.0, mirroring bark's npm workaround. Release tag:payjoin-javascript-0.2.0+payjoin-1.0.0.0.1.0+payjoin-1.0.0: resets from 0.24.0-preview.1, whose number tracked the previously wrapped payjoin core version and would read as confusing under the new scheme; the-preview.Nsuffix is dropped since 0.x already conveys a pre-stable API. NuGet keeps the metadata in the nuspec but strips it from the.nupkgfilename and version comparisons (verified with a localdotnet pack), so the release tagpayjoin-csharp-0.1.0+payjoin-1.0.0is compared against the artifact with the metadata stripped. Requires unlisting0.24.0-preview.1and0.0.1on nuget.org so floating installs resolve the new line.Release tags are uniform across languages:
payjoin-{language}-{version}+payjoin-{version}, matching the existingpayjoin-dart-0.2.2+payjoin-1.0.0tag. Since npm, PyPI, and NuGet package identities cannot carry the build metadata, theverify-tag-versionaction now strips it from the tag before comparing whenever the packed artifact version has none; an artifact version that does carry metadata (dart) must still match exactly. Each RELEASING.md's versioning section is updated to codify the convention for its language.Closes the release item in #1816 once tagged and published.
Disclosure: co-authored by Claude Fable 5
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.
https://claude.ai/code/session_019BcdiyBCQQChuJ3dy7QJwm