Skip to content

Swig 3.0.8 breaks SVN Ruby bindings #602

@voxik

Description

@voxik

It seems that Swigh 3.0.8 breaks SVN Ruby bindings. I have tried to compile Subversion against Ruby 2.2.4 and 2.3.0 and in both case, the Subversions test suite breaks:

if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/libsvn_swig_ruby /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/../../../libsvn_*; do if [ -n "$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; \
cd /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby; \
          if [ "2" -eq 1 -a "2" -lt 9 ] ; then \
            /usr/bin/ruby -I /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby \
              /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/run-test.rb \
      --verbose=verbose; \
          else \
    /usr/bin/ruby -I /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby \
      /builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/run-test.rb; \
          fi
Loaded suite test
Started
...............................................................................
...............................................F
===============================================================================
Failure:
test_create(SvnFsTest)
/builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/test_fs.rb:65:in `assert_create'
/builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/test_fs.rb:74:in `test_create'
     71:   end
     72: 
     73:   def test_create
  => 74:     assert_create do |method, args, callback|
     75:       Svn::Fs.__send__(method, *args, &callback)
     76:     end
     77:   end

<Svn::Error::FsAlreadyClose> expected but was
<ObjectPreviouslyDeleted(<Expected argument 0 of type svn_fs_t *, but got SWIG::TYPE_p_svn_fs_t #<SWIG::TYPE_p_svn_fs_t:0x0055...
    in SWIG method 'svn_fs_path'>)>

diff:
+ ObjectPreviouslyDeleted(<Expected argument 0 of type svn_fs_t *, but got SWIG::TYPE_p_svn_fs_t #<SWIG::TYPE_p_svn_fs_t:0x0055...
?     S             vn::Error::FsAlreadyClose
?   in  WIG method 's  _f         _p   th'>)  
===============================================================================
F
===============================================================================
Failure:
test_create_for_backward_compatibility(SvnFsTest)
/builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/test_fs.rb:65:in `assert_create'
/builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/test_fs.rb:80:in `test_create_for_backward_compatibility'
     77:   end
     78: 
     79:   def test_create_for_backward_compatibility
  => 80:     assert_create do |method, args, callback|
     81:       Svn::Fs::FileSystem.__send__(method, *args, &callback)
     82:     end
     83:   end

<Svn::Error::FsAlreadyClose> expected but was
<ObjectPreviouslyDeleted(<Expected argument 0 of type svn_fs_t *, but got SWIG::TYPE_p_svn_fs_t #<SWIG::TYPE_p_svn_fs_t:0x0055...
    in SWIG method 'svn_fs_path'>)>

diff:
+ ObjectPreviouslyDeleted(<Expected argument 0 of type svn_fs_t *, but got SWIG::TYPE_p_svn_fs_t #<SWIG::TYPE_p_svn_fs_t:0x0055...
?     S             vn::Error::FsAlreadyClose
?   in  WIG method 's  _f         _p   th'>)  
===============================================================================
...................................F
===============================================================================
Failure:
test_create(SvnReposTest)
/builddir/build/BUILD/subversion-1.9.3/subversion/bindings/swig/ruby/test/test_repos.rb:110:in `test_create'
     107:     end
     108: 
     109:     assert(repos.closed?)
  => 110:     assert_raises(Svn::Error::ReposAlreadyClose) do
     111:       repos.fs
     112:     end
     113: 

<Svn::Error::ReposAlreadyClose> expected but was
<ObjectPreviouslyDeleted(<Expected argument 0 of type svn_repos_t *, but got SWIG::TYPE_p_svn_repos_t #<SWIG::TYPE_p_svn_repos_t:0x0...
    in SWIG method 'svn_repos_fs_wrapper'>)>

diff:
+ ObjectPreviouslyDeleted(<Expected argument 0 of type svn_repos_t *, but got SWIG::TYPE_p_svn_repos_t #<SWIG::TYPE_p_svn_repos_t:0x0...
?     S             vn::Error::ReposAl   r   eadyClose
?   in  WIG method 's  _             _fs_w app r'>)    
===============================================================================
..........................................................

Finished in 152.675316325 seconds.

222 tests, 5546 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
98.6486% passed

Build against Swig 3.0.7 works just fine. So I tried revert to Lib/ruby/rubyrun.swg to this version [1] and it worked just fine again. I suspect that 146252f is the cause of the issues.

Just FTR, the particular bits of the test suite can be executed as follows:

$ cd subversion/bindings/swig/ruby/
$ ruby -I.libs/ test/run-test.rb -t /SvnFsTest/ -n /^test_create$/

[1] https://github.com/swig/swig/blob/3d1e20248f8422681382be8a91c91d456d4595e7/Lib/ruby/rubyrun.swg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions