Repository navigation
Allow hooks 2 in the Dart bindings - #2052
Merged
Merged
Conversation
native_toolchain_rust 1.0.4+0 and later and code_assets 1.1.0 and later require hooks 2. An app that already resolves hooks 2, for example through flutter_rust_bridge_hooks 2.13, cannot depend on payjoin while it pins hooks ^1.0.0. hook/build.dart is unchanged. dart analyze hook is clean against the lowest resolution (hooks 2.0.2, code_assets 1.2.1, native_toolchain_rust 1.0.4+0) and the highest (hooks 2.2.0, code_assets 2.2.0, native_toolchain_rust 1.0.7) with Dart 3.12.2.
spacebear21
approved these changes
Nov 11, 2026
spacebear21
left a comment
Collaborator
There was a problem hiding this comment.
utACK 6c39a08
@ethicnology we published https://pub.dev/packages/payjoin/versions/0.26.0 earlier today which still has the old hooks dependencies, do you need a patch release follow-up asap?
Contributor
Author
|
Hey @spacebear21 no emergency, since bdk hasn't merge either. Once you will both compatible with flutter_rust_bridge 2.13 I will push for the update every bindings we use Thanks for your reactivity |
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.
The Dart bindings pin
hooks: ^1.0.0. Sincenative_toolchain_rust1.0.4+0 andcode_assets1.1.0, both requirehooks2, so an app that already resolveshooks2 cannot depend onpayjoin. We hit this in Bull Bitcoin Mobile: flutter_rust_bridge's Native Assets backend (flutter_rust_bridge_hooks2.13.0) requireshooks: ^2.0.2. bdk-dart is making the same change in bitcoindevkit/bdk-dart#141.This PR changes only
payjoin-ffi/dart/pubspec.yaml:hooks: ^2.0.2code_assets: ">=1.2.1 <3.0.0"native_toolchain_rust: ^1.0.4hook/build.dartis unchanged. With Dart 3.12.2,dart analyze hookis clean against both the lowest resolution (dart pub downgrade: hooks 2.0.2, code_assets 1.2.1, native_toolchain_rust 1.0.4+0) and the highest (dart pub upgrade: hooks 2.2.0, code_assets 2.2.0, native_toolchain_rust 1.0.7). I did not rundart testor the reproducible-build job locally; CI covers them.Trade-off: apps still resolving
hooks1 cannot take a release with this change. hooks 2 has been out since May 2026 and the Flutter version pinned in CI (3.44.9) resolves it.Reviewer: @spacebear21
AI disclosure: the change, the local review against
AGENTS.md#code-review(no findings) and this description were produced with an AI assistant (Claude) and checked by me.Pull Request Checklist
Please confirm the following before requesting review: