libgit2 / rugged

ruby bindings to libgit2
MIT License
2.24k stars 277 forks source link

libgit2 1.8: TreeToTreeDiffTest#test_each_line_patch_header fails #978

Open dvzrv opened 4 months ago

dvzrv commented 4 months ago

Hi! :wave:

We're currently rebuilding everything against libgit2 1.8 on Arch Linux. With current ruby-rugged 1.7.2 I noticed one test failure when rebuilding:

Finished in 6.331293s, 87.0280 runs/s, 368.0133 assertions/s.

  1) Skipped:
RemoteNetworkTest#test_remote_check_connection_push [/build/ruby-rugged/src/rugged-1.7.2/test/remote_test.rb:10]:
no local git-daemon

  2) Skipped:
RemoteNetworkTest#test_remote_network_connect [/build/ruby-rugged/src/rugged-1.7.2/test/remote_test.rb:10]:
no local git-daemon

  3) Skipped:
RemoteNetworkTest#test_remote_check_connection_fetch [/build/ruby-rugged/src/rugged-1.7.2/test/remote_test.rb:10]:
no local git-daemon

  4) Skipped:
RemoteNetworkTest#test_remote_check_connection_push_credentials [/build/ruby-rugged/src/rugged-1.7.2/test/remote_test.rb:32]:
Skipped, no message given

  5) Skipped:
RemoteNetworkTest#test_remote_check_connection_invalid [/build/ruby-rugged/src/rugged-1.7.2/test/remote_test.rb:10]:
no local git-daemon

  6) Failure:
TreeToTreeDiffTest#test_each_line_patch_header [/build/ruby-rugged/src/rugged-1.7.2/test/diff_test.rb:922]:
Expected: 2
  Actual: 0

551 runs, 2330 assertions, 1 failures, 0 errors, 5 skips
rake aborted!
Command failed with status (1): [ruby -w -I"lib:lib:test" /usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/blame_test.rb" "test/blob_test.rb" "test/branch_test.rb" "test/cherrypick_test.rb" "test/commit_test.rb" "test/config_test.rb" "test/diff_test.rb" "test/dotgit_test.rb" "test/errors_test.rb" "test/index_test.rb" "test/lib_test.rb" "test/merge_test.rb" "test/note_test.rb" "test/object_test.rb" "test/patch_test.rb" "test/rebase_test.rb" "test/reference_test.rb" "test/remote_test.rb" "test/repo_apply_test.rb" "test/repo_ignore_test.rb" "test/repo_pack_test.rb" "test/repo_reset_test.rb" "test/repo_test.rb" "test/revert_test.rb" "test/settings_test.rb" "test/signature_test.rb" "test/status_test.rb" "test/submodule_test.rb" "test/tag_test.rb" "test/tree_test.rb" "test/walker_test.rb" --verbose]
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/testtask.rb:130:in `block (3 levels) in define'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_utils.rb:57:in `sh'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_utils.rb:104:in `ruby'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/testtask.rb:117:in `block (2 levels) in define'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/file_utils_ext.rb:58:in `verbose'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/testtask.rb:111:in `block in define'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/usr/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/bin/rake:23:in `load'
/usr/bin/rake:23:in `<main>'
Tasks: TOP => testz

ruby-rugged-1.7.2-2-x86_64-check.log ruby-rugged-1.7.2-2-x86_64-build.log

carlosmn commented 4 months ago

This is a bug in libgit2 AFAICT, see https://github.com/libgit2/libgit2/pull/5893#issuecomment-2033644738

nunotexbsd commented 3 weeks ago

Hello,

Doing build at FreeBSD with libgit2 1.8.1 and buid fails with:

<snip>
Building native extensions with: '--use-system-libraries'
This could take a while...
ERROR:  Error installing rugged-1.7.2.gem:
    ERROR: Failed to build gem native extension.

    current directory: /wrkdirs/usr/ports/devel/rubygem-rugged/work/stage/usr/local/lib/ruby/gems/3.2/gems/rugged-1.7.2/ext/rugged
/usr/local/bin/ruby32 extconf.rb --use-system-libraries
checking for gmake... no
checking for make... yes
Building Rugged using system libraries.
libgit2 version is not compatible, expected ~> 1.7.0
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
<snip>

Am I missing something here or libgit2 1.8.1 isn't supported yet?

Full log here

Thanks

Thanks