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

bump libgit2 to 1.5.0 #858

merged 1 commit into from Jul 19, 2022

Conversation

davidkna
Copy link
Contributor

Fixup for #839
libgit2 1.5.0 was released shortly after it was merged, so switch from main to the stable v1.5.0 tag and amend cfg.range_version to include v1.5.0.

@@ -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.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me. AFAICT, compatibility with 1.4.4 should be fine, I don't see any ABI changes.

@ehuss ehuss merged commit 951dce9 into rust-lang:master Jul 19, 2022
@davidkna davidkna deleted the git2150 branch August 16, 2022 15:42
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.

None yet

5 participants