-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update git2 to 0.14 #1733
Update git2 to 0.14 #1733
Conversation
git2-rs recently updated major versions due to libgit2 doing the same. Bump the version used in sqlx accordingly, to allow users of the new git2 to use git2::Oid with sqlx.
This is a breaking change since it's a public dependency and so will have to be part of 0.6.0 |
@abonander Ouch. Would you consider a |
We tried that with |
And now that I think about it more, this is kind of a weirdly arbitrary thing to integrate directly into SQLx. I think I'd rather work on a way to make it easier to create newtype wrappers to shuttle random types like |
@abonander wrote:
There would, but I'd be happy to ensure that such use cases get a clear compile-time error (e.g. "you can't enable both the git2 and git2-0-14 features"). The point of this is to migrate from one to the other, not to support using both simultaneously.
I agree entirely. I'd love to figure out an appropriate language feature that would make it possible for such integration to occur in a separate However, in the interim, I currently have code that's using git2 and sqlx, and I'd really like to upgrade to git2 0.14, but I can't currently do so because of this issue. |
Nevermind, it seems that that isn't possible for things that link to a native library, even if they're controlled by features. :(
|
So I'm thinking of something like: #[derive(sqlx::Type)]
pub struct Git2Oid(#[sqlx(try_from = "Vec<u8>")] pub git2::Oid);
Even more reason to move it out of SQLx, so you don't have to wait for us to upgrade. |
git2-rs recently updated major versions due to libgit2 doing the same.
Bump the version used in sqlx accordingly, to allow users of the new
git2 to use git2::Oid with sqlx.