Skip to content

Conversation

@cljoly
Copy link
Contributor

@cljoly cljoly commented Dec 10, 2023

I’ve released a new beta version of rusqlite_migration today and I’ve
renamed the async-tokio-rusqlite feature that you use to
alpha-async-tokio-rusqlite. I suggest updating dependencies as done in
this PR. By the way, if you would like to share feedback on the async
APIs, feel free to use this conversation:
cljoly/rusqlite_migration#127

Reading the release notes from tokio-rusqlite, the main breaking
change is to the method Connection::call:

  • breaking: Connection::call now takes tokio_rusqlite::Result instead
    of rusqlite::Result.

My understanding is that we can either deal with a Result<Result<…>>
or call Connection::call_unwrap, which could panic if the connection
is closed. I’ve opted for using only Connection::call and,
effectively, flattening the Result<Result<…>>, to limit the potential
for panics.

I’ve released a new beta version of rusqlite_migration today and I’ve
renamed the `async-tokio-rusqlite` feature that you use to
`alpha-async-tokio-rusqlite`. I suggest updating dependencies as done in
this PR. By the way, if you would like to share feedback on the async
APIs, feel free to use this conversation:
cljoly/rusqlite_migration#127

Reading the release notes from [tokio-rusqlite][1], the main breaking
change is to the method `Connection::call`:

> - **breaking:** `Connection::call` now takes `tokio_rusqlite::Result` instead
>   of `rusqlite::Result`.

My understanding is that we can either deal with a `Result<Result<…>>`
or call `Connection::call_unwrap`, which could panic if the connection
is closed. I’ve opted for using only `Connection::call` and,
effectively, flattening the `Result<Result<…>>`, to limit the potential
for panics.

[1]: https://github.com/programatik29/tokio-rusqlite/blob/master/CHANGELOG.md#050-25-nov-2023
@wsxiaoys
Copy link
Member

Thanks for the PR, LGTM

@wsxiaoys wsxiaoys merged commit c461a83 into TabbyML:main Dec 11, 2023
wsxiaoys pushed a commit that referenced this pull request Dec 11, 2023
I’ve released a new beta version of rusqlite_migration today and I’ve
renamed the `async-tokio-rusqlite` feature that you use to
`alpha-async-tokio-rusqlite`. I suggest updating dependencies as done in
this PR. By the way, if you would like to share feedback on the async
APIs, feel free to use this conversation:
cljoly/rusqlite_migration#127

Reading the release notes from [tokio-rusqlite][1], the main breaking
change is to the method `Connection::call`:

> - **breaking:** `Connection::call` now takes `tokio_rusqlite::Result` instead
>   of `rusqlite::Result`.

My understanding is that we can either deal with a `Result<Result<…>>`
or call `Connection::call_unwrap`, which could panic if the connection
is closed. I’ve opted for using only `Connection::call` and,
effectively, flattening the `Result<Result<…>>`, to limit the potential
for panics.

[1]: https://github.com/programatik29/tokio-rusqlite/blob/master/CHANGELOG.md#050-25-nov-2023
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.

2 participants