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

Building against libgit2 1.2.0 results in failing tests #124

Closed
donbex opened this issue Oct 25, 2021 · 1 comment
Closed

Building against libgit2 1.2.0 results in failing tests #124

donbex opened this issue Oct 25, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@donbex
Copy link

donbex commented Oct 25, 2021

The libgit2 in the Arch repositories has been upgraded to version 1.2.0, so after a system update I encountered the error

sheldon: error while loading shared libraries: libgit2.so.1.1: cannot open shared object file: No such file or directory

I tried re-building sheldon from source using the AUR package, but it resulted in a bunch of test failures:

failures:

---- lock::tests::external_plugin_lock_git_with_uses stdout ----
thread 'lock::tests::external_plugin_lock_git_with_uses' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1181:62

---- lock::tests::external_plugin_lock_git_with_matches_error stdout ----
thread 'lock::tests::external_plugin_lock_git_with_matches_error' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1255:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- lock::tests::external_plugin_lock_git_with_matches_not_each stdout ----
thread 'lock::tests::external_plugin_lock_git_with_matches_not_each' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1283:62

---- lock::tests::external_plugin_lock_git_with_matches stdout ----
thread 'lock::tests::external_plugin_lock_git_with_matches' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1221:62

---- lock::tests::source_lock_git_git_with_checkout stdout ----
thread 'lock::tests::source_lock_git_git_with_checkout' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `git://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1068:10

---- lock::tests::source_lock_git_and_reinstall stdout ----
thread 'lock::tests::source_lock_git_and_reinstall' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1009:89

---- lock::tests::locked_config_clean stdout ----
thread 'lock::tests::locked_config_clean' panicked at 'assertion failed: ctx.clone_dir().join(\"github.com/rossmacarthur/sheldon-test\").exists()', src/lock.rs:1397:9

---- lock::tests::source_lock_git_https_with_checkout stdout ----
thread 'lock::tests::source_lock_git_https_with_checkout' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1045:10

---- lock::tests::source_lock_with_git stdout ----
thread 'lock::tests::source_lock_with_git' panicked at 'called `Result::unwrap()` on an `Err` value: failed to git clone `https://github.com/rossmacarthur/sheldon-test`

Caused by:
    invalid version 0 on git_proxy_options; class=Invalid (3)', src/lock.rs:1135:40


failures:
    lock::tests::external_plugin_lock_git_with_matches
    lock::tests::external_plugin_lock_git_with_matches_error
    lock::tests::external_plugin_lock_git_with_matches_not_each
    lock::tests::external_plugin_lock_git_with_uses
    lock::tests::locked_config_clean
    lock::tests::source_lock_git_and_reinstall
    lock::tests::source_lock_git_git_with_checkout
    lock::tests::source_lock_git_https_with_checkout
    lock::tests::source_lock_with_git

I tried looking into it, but unfortunately I am not really familiar with Rust and couldn't locate the source of the error.

@rossmacarthur rossmacarthur added the bug Something isn't working label Oct 26, 2021
@rossmacarthur
Copy link
Owner

rossmacarthur commented Oct 26, 2021

Thanks for the report, I am able to replicate. Sheldon depends on the Rust libgit2-sys package and the latest release of Sheldon depends on an older version of that package that doesn't seem to support libgit2 version >=1.2.0, this issue exists up stream. I might have to release a newer version of Sheldon that updates these dependencies to fully resolve this. Additionally, I don't maintain the AUR package so I'm not sure how quickly it will be updated.

In the meantime you can try download the MUSL release from the releases page It was compiled to statically link to libgit2 and other dependencies so should just work out of the box. The following script can do it for you automatically.

curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh \
  | bash -s -- --repo rossmacarthur/sheldon --to /usr/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants