-
Notifications
You must be signed in to change notification settings - Fork 419
update submodule libgit2 to new commit to fix 'omits non-default port numbers' #421
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
Conversation
…ault port numbers' - rust-lang#405
Hm. Not sure what is causing the "Some checks were not successful" failures. In the Perhaps the CI builds should run |
@bhamail There is a separate package that needs to be run separately ( Also, I would expect it would be good to update to the latest release, and there will likely be some work necessary to deal with any breakage and build issues. |
@ehuss Thanks for looking this over. I tried to drill into the cause of the failures of the The details of the CI build failures seem to be showing this same error, so maybe we'll get lucky and fixing this error will fix them all.
I'm not sure where to dig next. Re 'latest release': I did initially try updating to the latest libgit2 release, but ran into some build errors that I was unable to fix the first few times around. If we could get this smaller patch merged, that would resolve the current log jam. I'm willing to come back and work on updating to the latest release after that (w/ the assumption I'll be pestering you with more of my silly noob questions). |
The ctest is showing that the Also, I'm getting a seg fault in the |
…ion in libgit2-sys/libgit2/include/git2/diff.h Thanks @ehuss
Zoinks! It appears the CI build is happy now. Thanks @ehuss for the help! |
git2-curl/tests/all.rs
Outdated
@@ -15,6 +15,7 @@ const PORT: u16 = 7848; | |||
|
|||
fn main() { | |||
unsafe { | |||
libgit2_sys::init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems somewhat suspicious in the sense that git2_curl
should internally not require this but instead do it on behalf of libraries. I think that there's perhaps a missing call to initialization somewhere inside of git2
itself, since git2_curl
only uses the APIs of git2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I meant that init
should be called from git2_curl::register
, not with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the init call into git2_curl::register
. 69334f8
Feels like I'm missing a way to get this init'd without adding a direct dependency on libgit2_sys, but I'm not seeing it. (noob alert).
git2-curl/Cargo.toml
Outdated
@@ -23,6 +23,7 @@ civet = "0.11" | |||
conduit = "0.8" | |||
conduit-git-http-backend = "0.8" | |||
tempfile = "3.0" | |||
libgit2-sys = { path = "../libgit2-sys"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't publish without a version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 437e22e
For my own learning: I was guessing a version was not needed due to no version declared in this other case for 'systest':
https://github.com/rust-lang/git2-rs/blob/master/systest/Cargo.toml#L8
I guess there is no magic that inherits the version from the higher level https://github.com/rust-lang/git2-rs/blob/master/Cargo.toml#L26 ?
libgit2-sys/lib.rs
Outdated
@@ -1112,7 +1112,7 @@ pub const GIT_DIFF_SHOW_UNMODIFIED: git_diff_option_t = 1 << 26; | |||
pub const GIT_DIFF_PATIENCE: git_diff_option_t = 1 << 28; | |||
pub const GIT_DIFF_MINIMAL: git_diff_option_t = 1 << 29; | |||
pub const GIT_DIFF_SHOW_BINARY: git_diff_option_t = 1 << 30; | |||
pub const GIT_DIFF_INDENT_HEURISTIC: git_diff_option_t = 1 << 31; | |||
pub const GIT_DIFF_INDENT_HEURISTIC: git_diff_option_t = 1 << 18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep this numerically sorted with the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Done in 2538388
git2-curl/src/lib.rs
Outdated
@@ -75,6 +75,7 @@ pub unsafe fn register(handle: Easy) { | |||
let handle = Arc::new(Mutex::new(handle)); | |||
let handle2 = handle.clone(); | |||
INIT.call_once(move || { | |||
libgit2_sys::init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general we try to auto-initialize libgit2 from the git2
wrapper crate, so could this call actually be moved into git2::transport::register
? I think there's a top-level ::init()
function as well in that crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved libgit2_sys::init()
into git2::transport::register. 4b4a1be
I played with moving it into places like: https://github.com/rust-lang/git2-rs/blob/master/src/lib.rs#L682, but no joy. Also not sure I understand how https://github.com/rust-lang/git2-rs/blob/master/src/lib.rs#L686 ties into:
https://github.com/rust-lang/git2-rs/blob/master/libgit2-sys/lib.rs#L3040
and: https://github.com/rust-lang/git2-rs/blob/master/libgit2-sys/lib.rs#L1594
👍 |
Ah, yea, this is definitely better, sorry for the confusion! @bhamail Do you think you'll be able to look at further updating to a newer version from here? If not, I can take a look at the build issues. |
@ehuss Feel free to look into build errors with a newer version. I will try to take a look next week, if you haven't already done it. Thanks again for all the help. |
Update submodule commit to use fixed version of libgit2 - #405