-
Notifications
You must be signed in to change notification settings - Fork 413
Error running tests after upgrade to libgit2-sys 0.12.23+1.2.0 #746
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
Comments
Can you provide some more information about how to reproduce and how minimize perhaps? The only usage of |
Nor am I unfortunately, but it started failing immediately after upgrading to git2 version 0.13.21, and only on my linux setup (Manjoro/Arch) - not on windows 10. After some searching and messing around I found that it ties down to the use of |
As for reproduction, I was running All tests succeed on all but my Manjaro system which was not updated in between the succeding/failing upgrade of our |
git2: pin to 0.13.21 until rust-lang/git2-rs#746 is fixed
This change is related to cargo-generate#461 and cargo-generate#455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team: rust-lang/git2-rs#746
This change is related to #461 and #455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team: rust-lang/git2-rs#746
This change is related to #461 and #455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team: rust-lang/git2-rs#746
I did the mind-numbing bisect of libgit2 to find out what the culprit is, hoping that someone can pick up from here and realize what went wrong. It appears the problem was introduced here: Specifically in libgit2/libgit2@72df17c Doing a "slightly-sloppy-but-hey-it-builds"-revert on top of v1.3.0 appears to fix it: srhb/libgit2@7d08801 |
It might be that an incompatible version of libgit2 from the system package manager is picked up. Maybe try building with the |
You got me on the right track -- the problem was the opposite. I was pulling in a too-old version of git2-rs (and transitively the -sys component) which was incompatible with the newer libgit2 I was linking against. I had the problem backwards. Thank you! 😄 |
I think this is an ABI break in libgit2. I (and many other Arch users) ran into exactly the same problem (my case is mentioned above this comment, rust-lang/crater#598), in most/all cases due to building a project with a dependency on a libgit2-sys intended for libgit2-1.1.0, but linking in libgit2 1.3.0. I feel like that ought to work, it's a minor version bump. So as far as I can tell, either libgit2 doesn't have ABI stability, or the libgit2 project is having a rough time trying to provide ABI stability. In either case, I think this line: Line 17 in f1a3e12
exactly_version or perhaps range_version in case there's a newer patch release on the system.
Things work fine at the moment on the latest version of this crate(s), but it's possible that is only because it is caught up to the latest libgit2 release, so either a matching version or a vendored version is used. At the moment. I would like some more insurance that code continues to build as time passes 😅 |
This seems to be the case (libgit2/libgit2#6210 (comment)). As that comment mentions, the precise API & ABI guarantees are documented in
|
libgit2 does not have a stable ABI across minor versions, as has been demonstrated in the last few minor releases, see rust-lang#813 and rust-lang#746. This pain is primarily suffered by users of rolling release distros, because they tend to get a new libgit2 version before the authors of libraries release versions that pull in the new libgit2-sys version which works with the new binary. This patch means that going forward, users don't need to rush to upgrade their version of libgit2-sys or suffer errors/UB in the meantime. If the system version changes, they will just start using the vendored version which has been tested against the bindings.
libgit2 does not have a stable ABI across minor versions, as has been demonstrated in the last few minor releases, see #813 and #746. This pain is primarily suffered by users of rolling release distros, because they tend to get a new libgit2 version before the authors of libraries release versions that pull in the new libgit2-sys version which works with the new binary. This patch means that going forward, users don't need to rush to upgrade their version of libgit2-sys or suffer errors/UB in the meantime. If the system version changes, they will just start using the vendored version which has been tested against the bindings.
I believe and trust that this has been fixed by @joshtriplett in the commit mentioned above. The problem was very repeatable on my machine, and has gone. Likewise there does not seem to be any new observations. If it is still an issue, we can either reopen, or create a new issue. |
In https://github.com/cargo-generate/cargo-generate, after upgrading
git2
to 0.13.22, tests no longer run due toTracing this error leads to the upgrade of libgit2-sys, and seems to be an old issue: https://www.google.com/search?q=Git+Error%3A+invalid+version+0+on+git_proxy_options
The text was updated successfully, but these errors were encountered: