-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
LibGit2: add resolve_url to RemoteCallbacksStruct for LibGit2 0.99.0 #35232
Conversation
Ah too bad, looks like we were both debugging this at the same time. Though this isn't enough to get tests to pass on 0.99.0, see #35233. |
Interesting, I ran the test suite while building the Arch Linux package, but apparently the LibGit2 tests are disabled there... The only reason why I could see the tests failing is the changed error message fa4481b#diff-d9d05c74120373a1756ee4a7e86c7cfeR3046. The other changes in your PR seem to be implemented in a backward-compatible way in LibGit2 0.99.0, so are not strictly required (but certainly make sense for the latest version). That said, your PR is a lot more comprehensive than mine, so seems to be the better option going forward, if backwards-compatibility with older LibGit2 versions is not required (I don't know how this is usually handled in Julia). |
For completeness I included the two changes from your PR that are necessary to make the unit test pass in order to make this a minimal self-contained patch that works with all versions of LibGit2. |
The test failure for the Windows build appears to be unrelated:
|
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.
Thanks! I guess we should backport this to 1.4, then we can sort out the libgit2 0.99.1 build issues in #35233 for master.
Upstream commit libgit2/libgit2@59647e1 ("remote: add callback to resolve URLs before connecting") introduced a new callback "resolve_url" in LibGit2 0.99.0. Even though it is not currently used in Julia, it needs to be accounted for to get the correct size for FetchOptionsStruct. An incorrectly aligned FetchOptionsStruct leads to error messages like "invalid version 0 on git_proxy_options" when trying to use the latest LibGit2 version.
Upstream commit libgit2/libgit2@b9c5b15 ("http: use the new httpclient") changed the error message to include additional quotes. Relax the unit test to allow these if present.
Since upstream commit libgit2/libgit2@e9cef7c ("http: introduce GIT_ERROR_HTTP") an invalid content type yields a GIT_ERROR_HTTP instead of a GIT_ERROR_NET error. Update the enum to include this new error so that the unit test for LibGit2 doesn't fail with "invalid value for Enum Class: 34".
…35232) * LibGit2: amend GitError enum Since upstream commit libgit2/libgit2@e9cef7c ("http: introduce GIT_ERROR_HTTP") an invalid content type yields a GIT_ERROR_HTTP instead of a GIT_ERROR_NET error. Update the enum to include this new error so that the unit test for LibGit2 doesn't fail with "invalid value for Enum Class: 34". * LibGit2: add resolve_url to RemoteCallbacksStruct for LibGit2 0.99.0 Upstream commit libgit2/libgit2@59647e1 ("remote: add callback to resolve URLs before connecting") introduced a new callback "resolve_url" in LibGit2 0.99.0. Even though it is not currently used in Julia, it needs to be accounted for to get the correct size for FetchOptionsStruct. An incorrectly aligned FetchOptionsStruct leads to error messages like "invalid version 0 on git_proxy_options" when trying to use the latest LibGit2 version. * LibGit2: update error message checking for LibGit2 0.99.0 Upstream commit libgit2/libgit2@b9c5b15 ("http: use the new httpclient") changed the error message to include additional quotes. Relax the unit test to allow these if present. Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr> (cherry picked from commit 59a315c)
…uliaLang#35232) * LibGit2: amend GitError enum Since upstream commit libgit2/libgit2@e9cef7c ("http: introduce GIT_ERROR_HTTP") an invalid content type yields a GIT_ERROR_HTTP instead of a GIT_ERROR_NET error. Update the enum to include this new error so that the unit test for LibGit2 doesn't fail with "invalid value for Enum Class: 34". * LibGit2: add resolve_url to RemoteCallbacksStruct for LibGit2 0.99.0 Upstream commit libgit2/libgit2@59647e1 ("remote: add callback to resolve URLs before connecting") introduced a new callback "resolve_url" in LibGit2 0.99.0. Even though it is not currently used in Julia, it needs to be accounted for to get the correct size for FetchOptionsStruct. An incorrectly aligned FetchOptionsStruct leads to error messages like "invalid version 0 on git_proxy_options" when trying to use the latest LibGit2 version. * LibGit2: update error message checking for LibGit2 0.99.0 Upstream commit libgit2/libgit2@b9c5b15 ("http: use the new httpclient") changed the error message to include additional quotes. Relax the unit test to allow these if present. Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Upstream commit libgit2/libgit2@59647e1 ("remote: add callback to resolve URLs before connecting") introduced a new callback
resolve_url
in LibGit2 0.99.0. Even though it is not currently used in Julia, it needs to be accounted for to get the correct size forFetchOptionsStruct
. An incorrectly alignedFetchOptionsStruct
leads to error messages like "invalid version 0 on git_proxy_options" when trying to use the latest LibGit2 version.Fixes: GH-35043
Fixes: FS#65540