You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Andreas Stieger <An...@gmx.de> on 2024/10/13 18:32:04 UTC

check-swig-rb failures with SWIG 4.3.0

Hello,

I was made aware of an openSUSE bug report outlining that the build for
1.14.x fails with the upcoming swig 4.3 (4.3.0beta1):
https://bugzilla.opensuse.org/show_bug.cgi?id=1231590

I was able to reproduce with trunk when switching from SWIG 4.2.1 to
4.3.0beta1:

make -j4 V=1 VERBOSE=1 check-swig-rb
[...]

Error: test_add_force(SvnClientTest): NoMethodError: undefined method
`fs' for an instance of Array
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/util.rb:164:in
`setup_repository'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/util.rb:95:in
`setup_basic'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/test_client.rb:30:in
`setup'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:115:in
`run'
========================================================================================================================
E
========================================================================================================================
Error: test_add_force(SvnClientTest): NoMethodError: undefined method
`close' for an instance of Array
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/util.rb:169:in
`teardown_repository'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/util.rb:107:in
`teardown_basic'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/test_client.rb:34:in
`teardown'
/home/astieger/dev/subversion/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:115:in
`run'

repeating for all tests..

That's all I know for now.

Andreas


Re: check-swig-rb failures with SWIG 4.3.0

Posted by Jun Omae <ju...@gmail.com>.
On 2024/10/22 6:07, Andreas Stieger wrote:
> 
> On 2024-10-18 16:52, Andreas Stieger wrote
>>
>> On 2024-10-18 07:57, Jun Omae wrote:
>>> I created patches and tested with SWIG 3.0.12, 4.2.1, 4.3.0-beta1.
>>>
>>>   - swig-4.3.0-swig-rb.patch.txt        (swig-rb for trunk and 1.14.x)
>>>   - swig-4.3.0-swig-py@trunk.patch.txt  (swig-py for trunk)
>>>   - swig-4.3.0-swig-py@1.14.x.patch.txt (swig-py for 1.14.x)
>>>
>>> Could anybody please test the patches?
>>
>>
>> Builds and tests (testsuite) fine for me on:
>>
>> * trunk x {4.2.1,4.3.0-beta1} * 1.14.3 x {4.2.1,4.3.0-beta1}
> 
> 
> And same 4.3.0 (final). Are you committing these?
> 
> Andreas
> 

Sorry for the delay and thanks for the testing!
Committed in r1921505 and r1921506, and nominated for 1.14.x.

-- 
Jun Omae <ju...@gmail.com> (大前 潤)

Re: check-swig-rb failures with SWIG 4.3.0

Posted by Andreas Stieger <An...@gmx.de>.
On 2024-10-18 16:52, Andreas Stieger wrote
>
> On 2024-10-18 07:57, Jun Omae wrote:
>> I created patches and tested with SWIG 3.0.12, 4.2.1, 4.3.0-beta1.
>>
>>   - swig-4.3.0-swig-rb.patch.txt        (swig-rb for trunk and 1.14.x)
>>   - swig-4.3.0-swig-py@trunk.patch.txt  (swig-py for trunk)
>>   - swig-4.3.0-swig-py@1.14.x.patch.txt (swig-py for 1.14.x)
>>
>> Could anybody please test the patches?
>
>
> Builds and tests (testsuite) fine for me on:
>
> * trunk x {4.2.1,4.3.0-beta1} * 1.14.3 x {4.2.1,4.3.0-beta1}


And same 4.3.0 (final). Are you committing these?

Andreas


Re: check-swig-rb failures with SWIG 4.3.0

Posted by Andreas Stieger <An...@gmx.de>.
Hi,

On 2024-10-18 07:57, Jun Omae wrote:
> On 2024/10/14 16:37, Yasuhito FUTATSUKI wrote:
>> On 2024/10/14 12:37, Yasuhito FUTATSUKI wrote:
>>> It seems it is caused by backward incompatible change of SWIG,
>>> even it may be a bug.
>> It turned out this is not a bug of SWIG, but intentional, for
>> the purpose to fix another problem, incompatible change of
>> SWIG_Ruby_AppendOutput, SWIG_Python_AppendOutput (and it affect
>> the process how we construct result objects).
>>
>> Thanks,
> SWIG 4.3.0-beta1 doesn't work with swig-rb and swig-py bindings, for our use
> case that the svn_error_t * return value is not used as a return value on
> success and is raised as an exception on error. Also, our %typemap(out) which
> uses %append_output for swig-rb has issues.
>
> I created patches and tested with SWIG 3.0.12, 4.2.1, 4.3.0-beta1.
>
>   - swig-4.3.0-swig-rb.patch.txt        (swig-rb for trunk and 1.14.x)
>   - swig-4.3.0-swig-py@trunk.patch.txt  (swig-py for trunk)
>   - swig-4.3.0-swig-py@1.14.x.patch.txt (swig-py for 1.14.x)
>
> Could anybody please test the patches?


Builds and tests (testsuite) fine for me on:

* trunk x {4.2.1,4.3.0-beta1} * 1.14.3 x {4.2.1,4.3.0-beta1}

Andreas


Re: check-swig-rb failures with SWIG 4.3.0

Posted by Jun Omae <ju...@gmail.com>.
On 2024/10/14 16:37, Yasuhito FUTATSUKI wrote:
> On 2024/10/14 12:37, Yasuhito FUTATSUKI wrote:
>> It seems it is caused by backward incompatible change of SWIG,
>> even it may be a bug.
> 
> It turned out this is not a bug of SWIG, but intentional, for
> the purpose to fix another problem, incompatible change of
> SWIG_Ruby_AppendOutput, SWIG_Python_AppendOutput (and it affect
> the process how we construct result objects).
> 
> Thanks,

SWIG 4.3.0-beta1 doesn't work with swig-rb and swig-py bindings, for our use
case that the svn_error_t * return value is not used as a return value on
success and is raised as an exception on error. Also, our %typemap(out) which
uses %append_output for swig-rb has issues.

I created patches and tested with SWIG 3.0.12, 4.2.1, 4.3.0-beta1.

 - swig-4.3.0-swig-rb.patch.txt        (swig-rb for trunk and 1.14.x)
 - swig-4.3.0-swig-py@trunk.patch.txt  (swig-py for trunk)
 - swig-4.3.0-swig-py@1.14.x.patch.txt (swig-py for 1.14.x)

Could anybody please test the patches?

-- 
Jun Omae <ju...@gmail.com> (大前 潤)

Re: check-swig-rb failures with SWIG 4.3.0

Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
On 2024/10/14 12:37, Yasuhito FUTATSUKI wrote:
> It seems it is caused by backward incompatible change of SWIG,
> even it may be a bug.

It turned out this is not a bug of SWIG, but intentional, for
the purpose to fix another problem, incompatible change of
SWIG_Ruby_AppendOutput, SWIG_Python_AppendOutput (and it affect
the process how we construct result objects).

Thanks,
-- 
Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>

Re: check-swig-rb failures with SWIG 4.3.0

Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
Hello,

On 2024/10/14 3:32, Andreas Stieger wrote:
> Hello,
> 
> I was made aware of an openSUSE bug report outlining that the build for
> 1.14.x fails with the upcoming swig 4.3 (4.3.0beta1):
> https://bugzilla.opensuse.org/show_bug.cgi?id=1231590
> 
> I was able to reproduce with trunk when switching from SWIG 4.2.1 to
> 4.3.0beta1:
>
> make -j4 V=1 VERBOSE=1 check-swig-rb
> [...]
> 
> Error: test_add_force(SvnClientTest): NoMethodError: undefined method
> `fs' for an instance of Array

In this context, 'fs' is a return value of Repos.create() which is
wrapped object of svn_repos_t * in C, returned from svn_repos_create(),
not an Array.

It seems it is caused by backward incompatible change of SWIG,
even it may be a bug.

Could you please report it to the SWIG project?

Thanks,
-- 
Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>