Skip to content

chore(deps): require hooks 2 - #141

Open
Johnosezele wants to merge 3 commits into
bitcoindevkit:mainfrom
Johnosezele:chore/hooks-2
Open

Johnosezele wants to merge 3 commits into
bitcoindevkit:mainfrom
Johnosezele:chore/hooks-2

Conversation

@Johnosezele

@Johnosezele Johnosezele commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Raise hooks to ^2.1.0 and native_toolchain_rust to ^1.0.7 so apps already on hooks 2 can depend on this package.
  • Raise the code_assets dev dependency to ^2.0.0, which native_toolchain_rust 1.0.7 requires.
  • Leave hook/build.dart unchanged. It only calls build and RustBuilder.

Without this any app already on hooks 2 cannot depend on this package. Apps still on hooks 1 can no longer depend on this package. This also improves pub.dev score, as is a requirement

closes #137

Test

  • dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides shows hooks 2.2.0 and native_toolchain_rust 1.0.7 as current and latest
  • dart analyze is clean
  • pub.dev "Support up-to-date dependencies" scores the dependency points

native_toolchain_rust 1.0.7 needs hooks 2, and the ^1.0.0 constraint blocks any app already on hooks 2. Raise it before 1.0.0 so this is not a breaking change after stable.
@Johnosezele
Johnosezele requested a review from reez September 23, 2026 12:06
@reez

reez commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Are we intentionally dropping Flutter 3.38 support? flutter pub get works on the base branch but fails on this PR because Flutter pins meta 1.17.0 and the new hooks dependency requires meta 1.19.0.

And then I published 1.0.0 so we just need to tweak the changelog saying rc4

@Johnosezele

Copy link
Copy Markdown
Collaborator Author

Are we intentionally dropping Flutter 3.38 support?

Not as the goal. This PR raises hooks to ^2.1.0, and that floor cannot resolve on Flutter 3.38.

flutter pub get works on the base branch but fails on this PR

flutter pub get fails because hooks 2.1 or newer pulls record_use 1, which needs meta 1.19.0 or newer. Flutter 3.38's package:flutter depends on meta: 1.17.0 exactly, so it stays on 1.17.0. The base branch is still on hooks 1, which allows that.

@Johnosezele

Copy link
Copy Markdown
Collaborator Author

And then I published 1.0.0 so we just need to tweak the changelog saying rc4

Great!

@reez

reez commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Are we intentionally dropping Flutter 3.38 support?

Not as the goal. This PR raises hooks to ^2.1.0, and that floor cannot resolve on Flutter 3.38.

flutter pub get works on the base branch but fails on this PR

flutter pub get fails because hooks 2.1 or newer pulls record_use 1, which needs meta 1.19.0 or newer. Flutter 3.38's package:flutter depends on meta: 1.17.0 exactly, so it stays on 1.17.0. The base branch is still on hooks 1, which allows that.

Thanks, that confirms the cause. Can we try those lower bounds and test Flutter 3.38 before deciding to drop support? If we do intend to drop it, should we state that explicitly and put the changelog entry?

Lower the floors to hooks ^2.0.2 and native_toolchain_rust ^1.0.4. Those still allow the latest releases, and Flutter 3.38 can stop at hooks 2.0.2 and native_toolchain_rust 1.0.4+0 instead of requiring meta 1.19.
@Johnosezele

Copy link
Copy Markdown
Collaborator Author

@reez I've lower them to hooks: ^2.0.2 and native_toolchain_rust: ^1.0.4, these still work fine with Flutter 3.38

This branch has not been deployed

No deployments
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.

hooks 1 constraint blocks current native_toolchain_rust

2 participants