You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Vincent Batts <vb...@slackware.com> on 2011/12/17 05:49:13 UTC

[PATCH] enabling ruby in the subversion build

All,

Attached is a patch to allow the building of ruby bindings, for ruby
greater than 1.9.3, in addition to the 1.8.x series.

It includes updates to several of the ruby/tests/ items so that it can
work in both rubies.  I've tested it in ruby-1.8.7 and 1.9.3-p0, and
attached the output of 'check-swig-rb' for the two versions.

[[[
Fix issue #4083: remove the ruby > 1.8 check

* configure.ac
   adding another variable to get the tiny/teeny version. Including the
   program version, since the ruby API version did not change in their
   1.9.3 release.
* Makefile.in
   removing the verbose flag for the newer ruby
* subversion/bindings/swig/ruby/test/test_wc.rb
* subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb
* subversion/bindings/swig/ruby/test/test_fs.rb
* subversion/bindings/swig/ruby/test/test-unit-ext.rb
* subversion/bindings/swig/ruby/test/test_delta.rb
* subversion/bindings/swig/ruby/test/test_core.rb
* subversion/bindings/swig/ruby/test/my-assertions.rb
   all: accomodations to run in >= 1.9.3 and 1.8.x ruby

]]]

--
Vincent Batts

Re: [PATCH] enabling ruby in the subversion build

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Dec 19, 2011 at 05:01:05PM +0000, Philip Martin wrote:
> Vincent Batts <vb...@slackware.com> writes:
> 
> > On 19/12/11 10:55 +0000, Philip Martin wrote:
> >>Stefan Sperling <st...@elego.de> writes:
> >>
> >>> The tests are passing for me locally with ruby 1.8.
> >>
> >>And on my Debian machine with ruby 1.8.
> >
> > curious, which exact version of ruby?
> > i was testing on:
> > ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
> 
> I use Debian/stable with libruby-dev version 1.8.7.302-2squeeze1

I use ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-openbsd]

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Vincent Batts <vb...@slackware.com> writes:

> On 19/12/11 10:55 +0000, Philip Martin wrote:
>>Stefan Sperling <st...@elego.de> writes:
>>
>>> The tests are passing for me locally with ruby 1.8.
>>
>>And on my Debian machine with ruby 1.8.
>
> curious, which exact version of ruby?
> i was testing on:
> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]

I use Debian/stable with libruby-dev version 1.8.7.302-2squeeze1

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Vincent Batts <vb...@slackware.com>.
On 19/12/11 10:55 +0000, Philip Martin wrote:
>Stefan Sperling <st...@elego.de> writes:
>
>> The tests are passing for me locally with ruby 1.8.
>
>And on my Debian machine with ruby 1.8.

curious, which exact version of ruby?
i was testing on:
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]


-- 
Vincent Batts

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:

> The tests are passing for me locally with ruby 1.8.

And on my Debian machine with ruby 1.8.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Mon, Dec 19, 2011 at 11:46:14 +0100:
> On Mon, Dec 19, 2011 at 10:04:55AM +0200, Daniel Shahaf wrote:
> > On Sun, Dec 18, 2011, at 18:37, Vincent Batts wrote:
> > > I will start by working on all of the 'E' errors in the ruby tests
> > > straight. I primarily want to see these ruby bindings back into the main
> > > bundle of bindings, now that many distributions are defaulting to ruby
> > > 1.9.x. Arch linux has followed upstream suite and shipped a subversion
> > > without ruby bindings.
> > > 
> > > Should I send a separate patch, or amend the previous?
> > 
> > Please don't send interdiffs; but send patches against trunk@HEAD.
> > 
> > Please send separate patches for separate functional changes.  Getting
> > the tests to pass with ruby1.8 would be a separate functional change than
> > supporting ruby1.9.
> 
> The tests are passing for me locally with ruby 1.8.
> I would suspect some local problem at Vincent's side is preventing them
> from passing.

Could be either a local build problem on Vincent's side or a bug in the
testsuite causing it to fail in Vincent's environment; and in the latter
case we'd appreciate a patch.

Re: [PATCH] enabling ruby in the subversion build

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Dec 19, 2011 at 10:04:55AM +0200, Daniel Shahaf wrote:
> On Sun, Dec 18, 2011, at 18:37, Vincent Batts wrote:
> > I will start by working on all of the 'E' errors in the ruby tests
> > straight. I primarily want to see these ruby bindings back into the main
> > bundle of bindings, now that many distributions are defaulting to ruby
> > 1.9.x. Arch linux has followed upstream suite and shipped a subversion
> > without ruby bindings.
> > 
> > Should I send a separate patch, or amend the previous?
> 
> Please don't send interdiffs; but send patches against trunk@HEAD.
> 
> Please send separate patches for separate functional changes.  Getting
> the tests to pass with ruby1.8 would be a separate functional change than
> supporting ruby1.9.

The tests are passing for me locally with ruby 1.8.
I would suspect some local problem at Vincent's side is preventing them
from passing.

Re: [PATCH] enabling ruby in the subversion build

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
On Thu, Jan 12, 2012, at 10:58, Vincent Batts wrote:
> I haven't seen any commits or conversation about these patches. What's
> the next step?

Notwithstanding attempts to get attention to this thread, please file
them as bugs --- with the 'patch' keyword and milestone 1.8-consider.

Re: [PATCH] enabling ruby in the subversion build

Posted by Vincent Batts <vb...@slackware.com>.
On 20/12/11 21:08 -0800, Vincent Batts wrote:
>On 19/12/11 10:04 +0200, Daniel Shahaf wrote:
>>Please send separate patches for separate functional changes.  Getting
>>the tests to pass with ruby1.8 would be a separate functional change than
>>supporting ruby1.9.
>
>Okay after a bit of familiarizing myself with the svn library, attached
>are two patches. One that is a patch to accomodate the ruby bindings for
>1.8 and 1.9 (svn-ruby-1.9-fixes.patch).
>The other is an update to the unit tests, to catch ruby 1.9
>up to speed, while not breaking the tests for ruby 1.8 (svn-update-ruby-tests.patch)
>All tests pass ruby 1.8, like they have, and all but 1 pass on ruby
>1.9.3. The one test that is failing is in time_delta.rb, and is due to
>the overhaul of encoding that happened for ruby 1.9. I would welcome
>someone investigating this encoding challenge too. But otherwise things
>look pretty good to support ruby 1.9 now.

Bump.
I haven't seen any commits or conversation about these patches. What's
the next step?

Take care,
-- 
Vincent Batts

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Thank you!

Ruby community will be excited, I will continue to improve the tests.

On Thu, Nov 8, 2012 at 8:29 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Initial support for ruby 1.9.3 when creating swig bindings for subversion.
>
> I tweaked the format a little and committed in r1407206.  Thanks!
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Initial support for ruby 1.9.3 when creating swig bindings for subversion.

I tweaked the format a little and committed in r1407206.  Thanks!

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Initial support for ruby 1.9.3 when creating swig bindings for subversion.

* Makefile.in:
  Ruby 1.8 uses --verbose, 1.9 does not for run-test.rb
* subversion/bindings/swig/ruby/test/test_core.rb:
  Updated for ruby1.9 time, which uses nanoseconds
* subversion/bindings/swig/ruby/test/test_repos.rb:
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this.
* subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:
  run priority tests only for ruby1.8
* subversion/bindings/swig/ruby/test/test_delta.rb:
  fix nil return in ruby1.9,
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this
  fix StringIO encoding to be ASCII-8BIT, no longer assumed as in ruby1.8
* subversion/bindings/swig/ruby/test/test-unit-ext.rb:
  turn off some tests for ruby1.9, they should be fixed still
* subversion/bindings/swig/ruby/test/test_fs.rb:
  update md5 to digest/md5 in require
* subversion/bindings/swig/ruby/test/test_wc.rb,
subversion/bindings/swig/ruby/test/test_client.rb:
  ruby1.8 carries the assignment through block, ruby1.9 does not carry
assignments, we need to explicitly do this
* subversion/bindings/swig/ruby/test/my-assertions.rb:
  create intermediary assertion block handler
* subversion/bindings/swig/ruby/svn/util.rb:
  convert to string before splitting for ruby1.9 compat
* subversion/bindings/swig/ruby/svn/info.rb:
  use each_line for ruby1.9 and each for ruby1.8
* configure.ac:
  detect ruby1.9.3 - added teeny version detection
  restrict build to 1.8.x and >= 1.9.3

Patch by: Michael Chletsos <mp...@gmail.com>,
               Vincent Batts <vb...@slackware.com>




On Thu, Nov 8, 2012 at 1:03 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
>> passed for me, let me know what you get.
>
> That works for me.  It needs a log message before it can be committed.
> If you want to write it look at some old log messages and
> http://subversion.apache.org/docs/community-guide/conventions.html#log-messages
> for guidance.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
> passed for me, let me know what you get.

That works for me.  It needs a log message before it can be committed.
If you want to write it look at some old log messages and
http://subversion.apache.org/docs/community-guide/conventions.html#log-messages
for guidance.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
OK - this should fix your issues, tested on ruby1.9.3 and ruby1.8.7 -
passed for me, let me know what you get.

On Wed, Nov 7, 2012 at 4:40 PM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Here is a complete patch that I tested - more work needs to be done on
>> the tests, but currently all tests that are run, succeed on my system.
>
> It breaks the tests when run with ruby 1.8.7 on my Debian/testing
> machine which is a regression since they pass without the patch.
>
> Loaded suite .
> Started
> ............................Killed
> make: *** [check-swig-rb] Error 137
>
> I don't know much about Ruby but with --verbose=verbose the output ends:
>
> test_import_custom_revprops(SvnClientTest): .
> test_info(SvnClientTest): .
> test_info_with_depth(SvnClientTest): .
> test_list(SvnClientTest):
>
> so I think the last line is the failing test.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Here is a complete patch that I tested - more work needs to be done on
> the tests, but currently all tests that are run, succeed on my system.

It breaks the tests when run with ruby 1.8.7 on my Debian/testing
machine which is a regression since they pass without the patch.

Loaded suite .
Started
............................Killed
make: *** [check-swig-rb] Error 137

I don't know much about Ruby but with --verbose=verbose the output ends:

test_import_custom_revprops(SvnClientTest): .
test_info(SvnClientTest): .
test_info_with_depth(SvnClientTest): .
test_list(SvnClientTest):

so I think the last line is the failing test.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Here is a complete patch that I tested - more work needs to be done on
the tests, but currently all tests that are run, succeed on my system.

I based this on trunk today.

On Wed, Nov 7, 2012 at 8:57 AM, Michael Chletsos <mp...@gmail.com> wrote:
> Sorry - I am having one of those morning - this one should be good, I
> keep reversing my files and my thoughts . . .
>
> I will check out trunk later and fix the patches and this patch and
> make them all nice and be real.
>
>
>
> On Wed, Nov 7, 2012 at 8:54 AM, Peter Samuelson <pe...@p12n.org> wrote:
>>
>> [Michael Chletsos]
>>> sorry about confusion - here is the updated patch, with swig updates.
>>
>> Your patch seems to be reversed ('diff -u {new} {old}' whereas what
>> everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
>> seems to have been developed against something older than Subversion
>> trunk.  I note for example that you change some Config to RbConfig, a
>> change that was made in Subversion trunk months ago in r1337514.
>>
>> Please update your Subversion checkout to the current trunk, apply your
>> patch, then run 'svn diff' to generate a more current patch.
>>
>> Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Sorry - I am having one of those morning - this one should be good, I
keep reversing my files and my thoughts . . .

I will check out trunk later and fix the patches and this patch and
make them all nice and be real.



On Wed, Nov 7, 2012 at 8:54 AM, Peter Samuelson <pe...@p12n.org> wrote:
>
> [Michael Chletsos]
>> sorry about confusion - here is the updated patch, with swig updates.
>
> Your patch seems to be reversed ('diff -u {new} {old}' whereas what
> everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
> seems to have been developed against something older than Subversion
> trunk.  I note for example that you change some Config to RbConfig, a
> change that was made in Subversion trunk months ago in r1337514.
>
> Please update your Subversion checkout to the current trunk, apply your
> patch, then run 'svn diff' to generate a more current patch.
>
> Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Peter Samuelson <pe...@p12n.org>.
[Michael Chletsos]
> sorry about confusion - here is the updated patch, with swig updates.

Your patch seems to be reversed ('diff -u {new} {old}' whereas what
everyone wants to see is 'diff -u {old} {new}' or 'svn diff'), and also
seems to have been developed against something older than Subversion
trunk.  I note for example that you change some Config to RbConfig, a
change that was made in Subversion trunk months ago in r1337514.

Please update your Subversion checkout to the current trunk, apply your
patch, then run 'svn diff' to generate a more current patch.

Peter

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Michael Chletsos <mp...@gmail.com> writes:
>
>> Sorry for delay.  Patch for configure is attached.
>
> You don't patch configure, that's a generated file.  You patch
> configure.ac.

Some of configure is generated from build/ac-macros/swig.m4.

The original patch for the testsuite no longer applies to trunk.  If you
could update that as well it would be a help.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
sorry about confusion - here is the updated patch, with swig updates.



On Wed, Nov 7, 2012 at 8:06 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Sorry for delay.  Patch for configure is attached.
>
> You don't patch configure, that's a generated file.  You patch
> configure.ac.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Sorry for delay.  Patch for configure is attached.

You don't patch configure, that's a generated file.  You patch
configure.ac.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Sorry for delay.  Patch for configure is attached.

It also updates Config to RbConfig which will remove annoying errors
and is backwards compatible.

On Wed, Nov 7, 2012 at 5:43 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> The current patch I used does not fix the configure script, I could
>> modify that to only use <= 1.8.7 or >= 1.9.3 if you like.
>
> yes, please.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> The current patch I used does not fix the configure script, I could
> modify that to only use <= 1.8.7 or >= 1.9.3 if you like.

yes, please.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
I would support 1.9.3 - ruby 1.9.2 and 1.9.1 are not considered good
versions and are problematic.

The current patch I used does not fix the configure script, I could
modify that to only use <= 1.8.7 or >= 1.9.3 if you like.

On Wed, Nov 7, 2012 at 5:31 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> OK - first, I would not support ruby 1.9.1 - I assume that you really
>> have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
>> output of ruby -v
>>
>> I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.
>
> I used whatever was part of Debian stable:
>
> ii  ruby1.9.1      1.9.2.0-2      Interpreter of object-oriented scripting lan
>
> If 1.9.1 and 1.9.2 are not supported then the patch has to be modified
> to refuse to accpet them.  According to the package:
>
>  Ruby uses two parallel versioning schemes: the `Ruby library compatibility
>  version' (1.9.1 for this package), which is similar to a library SONAME, and
>  the `Ruby version' (1.9.3 for this package).
>
> Which versions should we support?
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> OK - first, I would not support ruby 1.9.1 - I assume that you really
> have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
> output of ruby -v
>
> I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.

I used whatever was part of Debian stable:

ii  ruby1.9.1      1.9.2.0-2      Interpreter of object-oriented scripting lan

If 1.9.1 and 1.9.2 are not supported then the patch has to be modified
to refuse to accpet them.  According to the package:

 Ruby uses two parallel versioning schemes: the `Ruby library compatibility
 version' (1.9.1 for this package), which is similar to a library SONAME, and
 the `Ruby version' (1.9.3 for this package).

Which versions should we support?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
OK - first, I would not support ruby 1.9.1 - I assume that you really
have 1.9.2 (debian/ubuntu uses a meta-package)- can you show me the
output of ruby -v

I would support ruby 1.9.3 and above - there were issues with 1.9.1 and 1.9.2.

If installing on debian/ubuntu, here are the steps for 1.9.3:

apt-get install build-essential openssl libreadline6 libreadline6-dev
zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xzvf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286

export CFLAGS="-Os"
time (./configure --prefix=/usr --with-ruby-version=1.9.3-p286
--program-suffix=-1.9.3-p286 && make && make install
DESTDIR=/tmp/ruby1.9.3-p286)

apt-get install ruby1.9.1 # you already have this installed, you can ignore it
gem install fpm
fpm -s dir -t deb -n ruby -v 1.9.3-p286 --description "Self-packaged
Ruby 1.9.3-p286" -C /tmp/ruby1.9.3-p286 -p ruby193-VERSION_ARCH.deb -d
"libstdc++6 (>= 4.4.3)"   -d
"libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)"   -d
"libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)"   -d "libssl0.9.8
(>= 0.9.8)" -d "zlib1g (>= 1:1.2.2)"
  -d "libyaml-0-2 (>= 0.1.3)"  usr/bin usr/lib usr/share/man usr/include
apt-get remove ruby1.9.1

dpkg -i ruby-1.9.3-p286

For sanities sake, create a wrapper for your ruby since the gc will be
pretty poor, create /usr/bin/ruby:

#!/bin/sh
export RUBY_HEAP_MIN_SLOTS=600000
export RUBY_GC_MALLOC_LIMIT=59000000
export RUBY_FREE_MIN=200000
exec "/usr/bin/ruby-1.9.3-p286" "$@"

then test: ruby -ropenssl -rzlib -rreadline -ryaml -e "puts :success"

This should get ruby 1.9.3 installed on your system, then the patch
should work fine.

On Wed, Nov 7, 2012 at 5:09 AM, Philip Martin
<ph...@wandisco.com> wrote:
> Michael Chletsos <mp...@gmail.com> writes:
>
>> Hi Philip -
>>
>> Not sure if you remember me from the Subversion Live! event the other
>> week (Michael with Assembla), anyhow . . . I was able to run the ruby
>> swig tests - though one test failed because of encoding, not a huge
>> deal breaker, and the regular make test ran fine - were you talking
>> about some other regression tests?
>
> I was unable to run the regression tests with the patch applied:
>
> http://svn.haxx.se/dev/archive-2012-01/0388.shtml
>
> The problem appears to be related to the test environment.  I don't do
> Ruby so I don't know how to fix it and I won't commit the patch until I
> can run the tests.
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Michael Chletsos <mp...@gmail.com> writes:

> Hi Philip -
>
> Not sure if you remember me from the Subversion Live! event the other
> week (Michael with Assembla), anyhow . . . I was able to run the ruby
> swig tests - though one test failed because of encoding, not a huge
> deal breaker, and the regular make test ran fine - were you talking
> about some other regression tests?

I was unable to run the regression tests with the patch applied:

http://svn.haxx.se/dev/archive-2012-01/0388.shtml

The problem appears to be related to the test environment.  I don't do
Ruby so I don't know how to fix it and I won't commit the patch until I
can run the tests.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Michael Chletsos <mp...@gmail.com>.
Hi Philip -

Not sure if you remember me from the Subversion Live! event the other
week (Michael with Assembla), anyhow . . . I was able to run the ruby
swig tests - though one test failed because of encoding, not a huge
deal breaker, and the regular make test ran fine - were you talking
about some other regression tests?

Thanks,
michael

On Wed, Nov 7, 2012 at 12:51 AM, Philip Martin
<ph...@wandisco.com> wrote:
> mpchlets <mp...@gmail.com> writes:
>
>> I am also very interested in seeing this get to a state of usability -
>> I am willing to help also.
>>
>> If there is a current status or anyone working on this, I would love
>> to pitch in and get this finalized.
>
> The patch allowed the tests to build when I tried it but I could not get
> the regression tests to run.  Can you run the tests?
>
> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
mpchlets <mp...@gmail.com> writes:

> I am also very interested in seeing this get to a state of usability -
> I am willing to help also.
>
> If there is a current status or anyone working on this, I would love
> to pitch in and get this finalized.

The patch allowed the tests to build when I tried it but I could not get
the regression tests to run.  Can you run the tests?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: [PATCH] enabling ruby in the subversion build

Posted by mpchlets <mp...@gmail.com>.
I am also very interested in seeing this get to a state of usability - I am
willing to help also.

If there is a current status or anyone working on this, I would love to
pitch in and get this finalized.



--
View this message in context: http://subversion.1072662.n5.nabble.com/PATCH-enabling-ruby-in-the-subversion-build-tp71512p175607.html
Sent from the Subversion Dev mailing list archive at Nabble.com.

Re: [PATCH] enabling ruby in the subversion build

Posted by Stefan Sperling <st...@elego.de>.
Any follow-ups on this? We need to support Ruby 1.9 eventually and
it would be great to get these patches into a state where they can
be committed.

On Thu, Jan 26, 2012 at 12:32:58PM +0000, Philip Martin wrote:
> Philip Martin <ph...@wandisco.com> writes:
> 
> > The line is:
> >
> >    require "test/unit/ui/testrunnermediator"
> >
> > ruby-1.8 works because testrunnermediator.rb is part of libruby1.8 on my
> > machine, it does not appear to be part of the standard ruby-1.9.1
> > install.
> 
> So I can install a gem:
> 
> export GEM_HOME=$HOME/.rubygems
> gem1.9.1 install test-unit
> 
> Now I get an "undefined method" error:
> 
> nice make check-swig-rb
> cd /home/pm/sw/subversion/obj2/subversion/bindings/swig/ruby; \
>           if [ "1" -eq 1 -a "9" -lt 9 ] ; then \
>             /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
>               /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb \
>               --verbose=normal; \
>           else \
>             /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
>               /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb; \
>           fi
> /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:162:in `alias_method': undefined method `run' for class `Test::Unit::TestSuite' (NameError)
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:162:in `<class:TestSuite>'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:153:in `<module:Unit>'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:25:in `<module:Test>'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:24:in `<top (required)>'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext.rb:21:in `<top (required)>'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb:38:in `<main>'
> 
> 
> -- 
> uberSVN: Apache Subversion Made Easy
> http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> The line is:
>
>    require "test/unit/ui/testrunnermediator"
>
> ruby-1.8 works because testrunnermediator.rb is part of libruby1.8 on my
> machine, it does not appear to be part of the standard ruby-1.9.1
> install.

So I can install a gem:

export GEM_HOME=$HOME/.rubygems
gem1.9.1 install test-unit

Now I get an "undefined method" error:

nice make check-swig-rb
cd /home/pm/sw/subversion/obj2/subversion/bindings/swig/ruby; \
          if [ "1" -eq 1 -a "9" -lt 9 ] ; then \
            /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
              /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb \
              --verbose=normal; \
          else \
            /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
              /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb; \
          fi
/home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:162:in `alias_method': undefined method `run' for class `Test::Unit::TestSuite' (NameError)
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:162:in `<class:TestSuite>'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:153:in `<module:Unit>'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:25:in `<module:Test>'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb:24:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext.rb:21:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb:38:in `<main>'


-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

>>         from <internal:lib/rubygems/custom_require>:29:in `require'
>>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/always-show-result.rb:20:in `<top (required)>'
>>         from <internal:lib/rubygems/custom_require>:29:in `require'
>>         from <internal:lib/rubygems/custom_require>:29:in `require'
>>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext.rb:20:in `<top (required)>'
>>         from <internal:lib/rubygems/custom_require>:29:in `require'
>>         from <internal:lib/rubygems/custom_require>:29:in `require'
>>         from /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb:38:in `<main>'
>> make: *** [check-swig-rb] Error 1
>
> Is this because only 1.9.1 is not supported and I need 1.9.3?  Both
> configure and 'make swig-rb' appear to work but 'make check-swig-rb'
> fails.

The line is:

   require "test/unit/ui/testrunnermediator"

ruby-1.8 works because testrunnermediator.rb is part of libruby1.8 on my
machine, it does not appear to be part of the standard ruby-1.9.1
install.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Vincent Batts <vb...@slackware.com> writes:
>
>> On 19/12/11 10:04 +0200, Daniel Shahaf wrote:
>>>Please send separate patches for separate functional changes.  Getting
>>>the tests to pass with ruby1.8 would be a separate functional change than
>>>supporting ruby1.9.
>>
>> Okay after a bit of familiarizing myself with the svn library, attached
>> are two patches. One that is a patch to accomodate the ruby bindings for
>> 1.8 and 1.9 (svn-ruby-1.9-fixes.patch).
>> The other is an update to the unit tests, to catch ruby 1.9
>> up to speed, while not breaking the tests for ruby 1.8 (svn-update-ruby-tests.patch)
>> All tests pass ruby 1.8, like they have, and all but 1 pass on ruby
>> 1.9.3. The one test that is failing is in time_delta.rb, and is due to
>> the overhaul of encoding that happened for ruby 1.9. I would welcome
>> someone investigating this encoding challenge too. But otherwise things
>> look pretty good to support ruby 1.9 now.
>
> I think you have names of two patches switched, but never mind.  When I
> try to use ruby 1.9.1 the tests fail:
>
> make check-swig-rb
> cd /home/pm/sw/subversion/obj2/subversion/bindings/swig/ruby; \
>           if [ "1" -eq 1 -a "9" -lt 9 ] ; then \
>             /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
>               /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb \
>               --verbose=normal; \
>           else \
>             /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
>               /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb; \
>           fi
> <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- test/unit/ui/testrunnermediator (LoadError)
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/always-show-result.rb:20:in `<top (required)>'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext.rb:20:in `<top (required)>'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from <internal:lib/rubygems/custom_require>:29:in `require'
>         from /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb:38:in `<main>'
> make: *** [check-swig-rb] Error 1

Is this because only 1.9.1 is not supported and I need 1.9.3?  Both
configure and 'make swig-rb' appear to work but 'make check-swig-rb'
fails.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Philip Martin <ph...@wandisco.com>.
Vincent Batts <vb...@slackware.com> writes:

> On 19/12/11 10:04 +0200, Daniel Shahaf wrote:
>>Please send separate patches for separate functional changes.  Getting
>>the tests to pass with ruby1.8 would be a separate functional change than
>>supporting ruby1.9.
>
> Okay after a bit of familiarizing myself with the svn library, attached
> are two patches. One that is a patch to accomodate the ruby bindings for
> 1.8 and 1.9 (svn-ruby-1.9-fixes.patch).
> The other is an update to the unit tests, to catch ruby 1.9
> up to speed, while not breaking the tests for ruby 1.8 (svn-update-ruby-tests.patch)
> All tests pass ruby 1.8, like they have, and all but 1 pass on ruby
> 1.9.3. The one test that is failing is in time_delta.rb, and is due to
> the overhaul of encoding that happened for ruby 1.9. I would welcome
> someone investigating this encoding challenge too. But otherwise things
> look pretty good to support ruby 1.9 now.

I think you have names of two patches switched, but never mind.  When I
try to use ruby 1.9.1 the tests fail:

make check-swig-rb
cd /home/pm/sw/subversion/obj2/subversion/bindings/swig/ruby; \
          if [ "1" -eq 1 -a "9" -lt 9 ] ; then \
            /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
              /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb \
              --verbose=normal; \
          else \
            /usr/bin/ruby1.9.1 -I /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby \
              /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb; \
          fi
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- test/unit/ui/testrunnermediator (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext/always-show-result.rb:20:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/pm/sw/subversion/src2/subversion/bindings/swig/ruby/test/test-unit-ext.rb:20:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/pm/sw/subversion/obj2/../src2/subversion/bindings/swig/ruby/test/run-test.rb:38:in `<main>'
make: *** [check-swig-rb] Error 1


-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: [PATCH] enabling ruby in the subversion build

Posted by Vincent Batts <vb...@slackware.com>.
On 19/12/11 10:04 +0200, Daniel Shahaf wrote:
>Please send separate patches for separate functional changes.  Getting
>the tests to pass with ruby1.8 would be a separate functional change than
>supporting ruby1.9.

Okay after a bit of familiarizing myself with the svn library, attached
are two patches. One that is a patch to accomodate the ruby bindings for
1.8 and 1.9 (svn-ruby-1.9-fixes.patch).
The other is an update to the unit tests, to catch ruby 1.9
up to speed, while not breaking the tests for ruby 1.8 (svn-update-ruby-tests.patch)
All tests pass ruby 1.8, like they have, and all but 1 pass on ruby
1.9.3. The one test that is failing is in time_delta.rb, and is due to
the overhaul of encoding that happened for ruby 1.9. I would welcome
someone investigating this encoding challenge too. But otherwise things
look pretty good to support ruby 1.9 now.

Take care,
-- 
Vincent Batts

Re: [PATCH] enabling ruby in the subversion build

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
On Sun, Dec 18, 2011, at 18:37, Vincent Batts wrote:
> I will start by working on all of the 'E' errors in the ruby tests
> straight. I primarily want to see these ruby bindings back into the main
> bundle of bindings, now that many distributions are defaulting to ruby
> 1.9.x. Arch linux has followed upstream suite and shipped a subversion
> without ruby bindings.
> 
> Should I send a separate patch, or amend the previous?

Please don't send interdiffs; but send patches against trunk@HEAD.

Please send separate patches for separate functional changes.  Getting
the tests to pass with ruby1.8 would be a separate functional change than
supporting ruby1.9.

Re: [PATCH] enabling ruby in the subversion build

Posted by Vincent Batts <vb...@slackware.com>.
On 17/12/11 17:36 +0100, Stefan Sperling wrote:
>Thanks for working on this! It's badly needed.
>
>Your test logs show failures for both versions.
>Do you get the same failures without your patch?
>The tests are supposed to pass.

Yeah, I wondered about that as well.
In fact none of the failures/errors are the same between the two
versions, unless I overlooked one. Although ruby 1.8 has 11 failures, 0
errors, while the ruby 1.9 has 5 failures and 12 errors. So there is
still more work to be done there.

I see that the 'check' and 'check-swig-pl' run with all success, but the
'check-swig-py' has an Exception and does not get off the ground.

I will start by working on all of the 'E' errors in the ruby tests
straight. I primarily want to see these ruby bindings back into the main
bundle of bindings, now that many distributions are defaulting to ruby
1.9.x. Arch linux has followed upstream suite and shipped a subversion
without ruby bindings.

Should I send a separate patch, or amend the previous?

Take care,
--
Vincent Batts

Re: [PATCH] enabling ruby in the subversion build

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Dec 16, 2011 at 08:49:13PM -0800, Vincent Batts wrote:
> All,
> 
> Attached is a patch to allow the building of ruby bindings, for ruby
> greater than 1.9.3, in addition to the 1.8.x series.
> 
> It includes updates to several of the ruby/tests/ items so that it can
> work in both rubies.  I've tested it in ruby-1.8.7 and 1.9.3-p0, and
> attached the output of 'check-swig-rb' for the two versions.
> 

Thanks for working on this! It's badly needed.

Your test logs show failures for both versions.
Do you get the same failures without your patch?
The tests are supposed to pass.