Skip to content
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

bump libgit2 to 1.5.0 #858

Merged
merged 1 commit into from Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion libgit2-sys/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libgit2-sys"
version = "0.14.0+1.4.4"
version = "0.14.0+1.5.0"
authors = ["Josh Triplett <josh@joshtriplett.org>", "Alex Crichton <alex@alexcrichton.com>"]
links = "git2"
build = "build.rs"
Expand Down
2 changes: 1 addition & 1 deletion libgit2-sys/build.rs
Expand Up @@ -14,7 +14,7 @@ fn main() {
let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
if try_to_use_system_libgit2 {
let mut cfg = pkg_config::Config::new();
if let Ok(lib) = cfg.range_version("1.4.4".."1.5.0").probe("libgit2") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to support 1.6.0 here already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was a (half-open) non-inclusive range that would not include 1.6.0 itself. Is it not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. idk

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weihanglo The in-repo libgit2 submodule uses a revision from the libgit2 main branch that almost matches libgit2 v1.5.0.

Copy link

@Teutates Teutates Jul 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to note that this check in and of itself is mostly based on a false premise.
This would make sense if it were attempting to solve API incompatibility issues on compile, but it isn't. It's being used to "solve" ABI incompatibility issues. libgit2, as far as I can tell, does not have an unstable API and only has an unstable ABI. This means that code compiled against libgit2 on ABI change will have to be recompiled, but as long as the API is still the same (which it would seem the API is stable...), no code would need to be changed. Regardless of this changing to 1.6.0 or 1.99.0, the result will still be the same: if the program links the system library, it will have to be recompiled on ABI change (major version change).

See #859.

if let Ok(lib) = cfg.range_version("1.4.4".."1.6.0").probe("libgit2") {
for include in &lib.include_paths {
println!("cargo:root={}", include.display());
}
Expand Down