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

1.6.2: git_odb_open symbol was removed #6519

Closed
0-wiz-0 opened this issue Mar 1, 2023 · 6 comments · Fixed by #6520
Closed

1.6.2: git_odb_open symbol was removed #6519

0-wiz-0 opened this issue Mar 1, 2023 · 6 comments · Fixed by #6520

Comments

@0-wiz-0
Copy link
Contributor

0-wiz-0 commented Mar 1, 2023

git_odb_open is missing in the 1.6.2 release. It was there in 1.5.1.

In 1.5.1:

# nm /usr/pkg/lib/libgit2.so | grep git_odb_open 
00000000000c6a0c T git_odb_open
00000000000c93dd T git_odb_open_rstream
00000000000c8e53 T git_odb_open_wstream

In 1.6.2:

# nm /usr/pkg/lib/libgit2.so | grep git_odb_open                                                                                          
00000000000cb40e T git_odb_open_rstream
00000000000cae77 T git_odb_open_wstream

It's still in the header file:

/usr/pkg/include/git2/odb.h:GIT_EXTERN(int) git_odb_open(

(though there will be a signature change when GIT_EXPERIMENTAL_SHA256 is enabled, which is a different problem).

Since this was not mentioned in the release notes for 1.6.0, 1.6.1, nor 1.6.2 and the prototype is still in the header, I guess this is an oversight.

@ethomson
Copy link
Member

ethomson commented Mar 1, 2023

Ugh. Yes, that's a bug. Thanks for reporting it.

(though there will be a signature change when GIT_EXPERIMENTAL_SHA256 is enabled, which is a different problem).

What's the problem with this? That it's a different API is by design.

If you want experimental SHA256 support, the entire API has changed. That's why it's opt-in.

This will eventually be the new API for libgit2 v2.0 once it's complete and working. 😓

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Mar 1, 2023

Sorry, I'm just used to "once you publish a function prototype, it's fixed forever".
It sounds like libgit2 will need source code changes for all users of the API. Perhaps it should be libgit3 then ;) Anyway, not really relevant for this issue, I'll shut up now :)

@ethomson
Copy link
Member

ethomson commented Mar 1, 2023

Yeah, it's unfortunate. We could do some terrible bisection of the APIs to try to avoid breakage. But I'd like to see people suggesting that it's necessary or useful before I commit to that. (This serves as a datapoint. 😄)

@ethomson
Copy link
Member

ethomson commented Mar 1, 2023

To expand on that - my thinking is that most people are not using libgit2, they're using LibGit2Sharp, rugged, nodegit, etc. and one of those needing to change once is not too onerous.

It will be interesting to see the delta between the APIs when SHA256 is in a usable state. Maybe we can just slap an _ext at the end of all the function names and call it a day with backcompat.

@ethomson
Copy link
Member

ethomson commented Mar 2, 2023

Apologies again for the oversight - I missed this during refactoring. Should be fixed by #6520. Since this is the second symbol we missed, I did diff the exported symbol names between 1.5 and 1.6 and this was the only other one. 😓

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Mar 2, 2023

Thanks for the fix, and for checking all symbols! Good idea :)

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Mar 2, 2023
keep the pkg-config file fix, bump PKGREVISION for that

Wait for libgit2/libgit2#6519 and
rust-lang/git2-rs#936 before upgrading.
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 a pull request may close this issue.

2 participants