rusqlite_migration icon indicating copy to clipboard operation
rusqlite_migration copied to clipboard

chore! Update rusqlite to v0.33

Open cljoly opened this issue 1 year ago • 5 comments

This PR aims to introduce a long term solution to update rusqlite to v0.33. If you need an updated version now, there is a stopgap alpha version that you might be able to use.


Changelog at https://github.com/rusqlite/rusqlite/releases/tag/v0.32.0

Concerns:

  • [ ] https://github.com/rusqlite/rusqlite/pull/1532/: does this mean that default transaction behavior can interfer with the migrations?
  • [ ] Update tokio-rusqlite, once a new version is ready: https://github.com/programatik29/tokio-rusqlite/pull/34
  • [X] Update Changelog to prepare for the release #182
  • [X] Bump MSRV if needed and see if that unlocks other deps update (#138)

cljoly avatar Jul 22 '24 21:07 cljoly

Hello, is there any progress?

xuxiaocheng0201 avatar Jul 25 '24 11:07 xuxiaocheng0201

@xuxiaocheng0201 as I understand it, we need tokio-rusqlite to update first, because we can only link to one version of libsqlite3-sys. You are welcome to open an issue with tokio-rusqlite (I’ll do it when I have more time) or propose a PR to update the dependency in rusqlite_migration if there is a solution I’m missing.

cljoly avatar Jul 25 '24 22:07 cljoly

@xuxiaocheng0201 there's already a PR available, waiting for merge: https://github.com/programatik29/tokio-rusqlite/pull/34

czocher avatar Jul 26 '24 10:07 czocher

Perhaps we can release a lite version without alpha-async-tokio-rusqlite feature? It seems that we are unable to contact the author of tokio-rusqlite. If you have this plan, then I am willing to submit a PR on a new branch.

xuxiaocheng0201 avatar Aug 03 '24 06:08 xuxiaocheng0201

Perhaps we can release a lite version without alpha-async-tokio-rusqlite feature?

Yes, we can release an alpha version without the feature, as a stop gap. We will need a more long term solution to release a stable version (where we have compatibility guarantees and try to make things that work well).

If you have this plan, then I am willing to submit a PR on a new branch.

Thanks, please go ahead.

As a side note, I tried dependency renaming (rusqlite_032 and rusqlite_033) to make the default and async features use different dependencies, but we still have the two sqlite versions in the dependency tree and compilation fails.

cljoly avatar Aug 04 '24 10:08 cljoly

@cljoly great success, the update was merged: https://github.com/programatik29/tokio-rusqlite/pull/34 we can now update our version.

czocher avatar Aug 20 '24 09:08 czocher

Thanks for flagging @czocher!

I understand we are still awaiting a release of tokio-rusqlite, aren’t we?

cljoly avatar Aug 20 '24 23:08 cljoly

Coverage Status

coverage: 94.03%. remained the same when pulling 40462f1aaf903f06a25b561d6112b92b9c9f45f0 on rusqlite-033 into bdf4a028e805f159d950e1e99c3c4789568a8c9f on master.

coveralls avatar Aug 20 '24 23:08 coveralls

It seems that no library code is changed to use the new rusqlite dependency. Could we just relax the version specification to allow both rusqlite versions by [rusqlite] version = ">=0.31.0, <0.33"? I did a quite test, it is both compatible with rusqlite 0.32 when alpha-async-tokio-rusqlite disabled and compatible with rusqlite 0.31 when enabled. So downstream user can decide which way to go and we won't need to wait for tokio-rusqlite (plus we don't need to do anything once they release. Cargo will select the newer version if possible automatically).

oxalica avatar Sep 03 '24 21:09 oxalica

It seems that no library code is changed to use the new rusqlite dependency. Could we just relax the version specification to allow both rusqlite versions by [rusqlite] version = ">=0.31.0, <0.33"? I did a quite test, it is both compatible with rusqlite 0.32 when alpha-async-tokio-rusqlite disabled and compatible with rusqlite 0.31 when enabled. So downstream user can decide which way to go and we won't need to wait for tokio-rusqlite (plus we don't need to do anything once they release. Cargo will select the newer version if possible automatically).

That's a great idea, certainly worth a try. Please feel free to open a PR. Otherwise I'll try it when I get the chance.

cljoly avatar Sep 04 '24 22:09 cljoly