Version 2.0.0 Alpha 1 #246
cljoly
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please share feedback on this alpha version, in particular the breaking changes. We can still make more changes before the stable release.
Version 2.0.0 Alpha 1
Breaking changes
Remove the
alpha-async-tokio-rusqlite
FeatureAs the name of the feature suggest, we have had experimental support for async using tokio for a while now. Supporting that feature has been quite a big burden, introducing some duplicated code in the
AsyncMigrations
struct in particular, as well as a whole set of very similar tests. Plus the benefit of async is limited here, because everything gets executed in a blocking fashion in sqlite anyway.It turns out that we don’t need the async support in rusqlite_migration for folks to use async libraries. For instance, with tokio-rusqlite, you can define migrations like in the sync context and run:
See the updated async example for details, in particular why it’s fine to call a method with unwrap in its name.
Make the Builder
Finalizer
Method Not GenericOn a related note, now that we have removed the
AsyncMigrations
(see the section right above) struct, we only haveMigrations
so there is no need for theMigrationsBuilder.finalize
method to be generic. Thus we removed the generic argument. To update your code, you can just do this:Remove
Migrations::new_iter
This function has been deprecated for a while now, remove it as a part of the major version bump. You can use the standard
FromIter
trait implementation instead.Behavior Change
Error::InvalidUserVersion
) when this can be detected. Previously, the library would silently misbehave.Dependencies
Rusqlite was updated from 0.32.1 to 0.34.0.
Please see the release notes for 0.34.0 and
the release notes for 0.33.0.
Tokio Rusqlite was removed as a dependency.
Features
Migrations::new
is nowconst
Minimum Rust Version
Rust 1.84.
Moving forward, we expect to keep this aligned with rusqlite itself, now that it has a policy (introduced in october 2024).
What's Changed
Migrations::new_iter
by @cljoly in refactor!: removeMigrations::new_iter
#235New Contributors
Full Changelog: v1.3.1...v2.0.0-alpha.1
This discussion was created from the release Version 2.0.0 Alpha 1.
Beta Was this translation helpful? Give feedback.
All reactions