You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Miller, Eric" <Er...@amd.com> on 2007/01/10 23:38:21 UTC

Perl swig bindings starting to smell

Is anyone working on, or interested in working on bringing the perl swig
bindings up to date?

They look like they are well past their expiration date.

 

I've been adding things that I need (status2 support), but it is a
currently beyond my means to do a comprehensive update.

 

Thanks,

Eric


Re: Perl swig bindings starting to smell

Posted by Daniel Rall <dl...@collab.net>.
On Wed, 17 Jan 2007, Nik Clayton wrote:

> ... the docs talk about a 'greek' tree.  I assume this is stored in
> the repo somewhere as a dump file.  For the life of me I can't find
> it.  Could someone point it to me?  Ta.

The Greek tree is the repository we use as the basis for our tests:

 http://svn.collab.net/repos/svn/trunk/subversion/tests/greek-tree.txt

The tree isn't actually stored as a Subversion dump file by the test
code.  Instead, it's described by a Python data structure
(svntest.main.greek_state), which uses Subversion's test suite's
Python libraries to create a dump file at test setup time
(svntest.actions.setup_pristine_repository()).

 https://svn.collab.net/repos/svn/trunk/subversion/tests/cmdline/svntest/

FWIW, the JavaHL test suite uses this same Greek tree, and same
approach in creating it.

Re: Perl swig bindings starting to smell

Posted by Karl Fogel <kf...@red-bean.com>.
On 1/17/07, Nik Clayton <ni...@ngo.org.uk> wrote:
> Speaking of which, the docs talk about a 'greek' tree.  I assume this is
> stored in the repo somewhere as a dump file.  For the life of me I can't
> find it.  Could someone point it to me?  Ta.

http://svn.collab.net/repos/svn/trunk/subversion/tests/greek-tree.txt

:-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Nik Clayton <ni...@ngo.org.uk>.
Daniel Rall wrote:
>>> The major change that I've started is the one that introduces named 
>>> parameters (and makes some of them optional if we can have sensible 
>>> defaults for them).
>> And I'm perfect happy to review those changes, but don't expect much new 
>> code from me (unless I get an itch I can't scratch while building the 
>> tests).  Initially, I'll focus on getting the two existing patches ready 
>> to merge to trunk; I'll stay out of your way on the named parameters piece.
> ...
> 
> How does the introduction of named parameters impact backwards
> compatibility?  (I assume it doesn't have to.)

It doesn't.  Both the current style and named params can co-exist.

> Sounds like a breakdown of who's doing what is forming:
> 
> - John has committed some outstanding patches against the bindings,
> which will be cleaned up a touch more.
> 
> - Nik is helping out with that cleanup, and will work on API named
> parameter support.
> 
> - John will enhance the test suite.

I think we'll both be working on the test suite, as stuff comes up.  And 
in no way should that be interpreted as a "hands off" to anyone else 
interested in working on the test suite :-)

Speaking of which, the docs talk about a 'greek' tree.  I assume this is 
stored in the repo somewhere as a dump file.  For the life of me I can't 
find it.  Could someone point it to me?  Ta.

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Daniel Rall <dl...@collab.net>.
On Wed, 17 Jan 2007, John Peacock wrote:

> Nik Clayton wrote:
> >I see you've committed 2646.  Are you planning on closing the ticket too 
> >(I've not poked around tigris.org yet, so I need to find out how to do 
> >that).
> 
> I don't think us mortals have the appropriate rights to close tickets. 
> I was only planning on adding a comment to the bugtracker that it had 
> been applied on the branch and whoever actually merged it to trunk would 
> probably be able to also close the ticket.

You need the appropriate role in the Subversion project on tigris.org,
which I've granted to you both.

...
> >The major change that I've started is the one that introduces named 
> >parameters (and makes some of them optional if we can have sensible 
> >defaults for them).
> 
> And I'm perfect happy to review those changes, but don't expect much new 
> code from me (unless I get an itch I can't scratch while building the 
> tests).  Initially, I'll focus on getting the two existing patches ready 
> to merge to trunk; I'll stay out of your way on the named parameters piece.
...

How does the introduction of named parameters impact backwards
compatibility?  (I assume it doesn't have to.)

Sounds like a breakdown of who's doing what is forming:

- John has committed some outstanding patches against the bindings,
which will be cleaned up a touch more.

- Nik is helping out with that cleanup, and will work on API named
parameter support.

- John will enhance the test suite.


Re-writing 'svn' in Perl and excercising it (perhaps using portions of
the existing cmdline test suite?) sounds like a really good test
suite and example of how to use the bindings.

Re: Perl swig bindings starting to smell

Posted by John Peacock <jp...@rowman.com>.
Nik Clayton wrote:
> I see you've committed 2646.  Are you planning on closing the ticket too 
> (I've not poked around tigris.org yet, so I need to find out how to do 
> that).

I don't think us mortals have the appropriate rights to close tickets. 
I was only planning on adding a comment to the bugtracker that it had 
been applied on the branch and whoever actually merged it to trunk would 
probably be able to also close the ticket.

> The patch in 2632 could use a little work.  I'd remove the "I've not 
> tested this" comments, and the examples should probably go in to a 
> separate directory of example programs that use the bindings (or be used 
> as test scripts).

As I said in my response to David's comments, I wanted to apply the 
patch to the branch as is, then clean it up before asking it be merged 
to trunk (revision history and all that).

> The major change that I've started is the one that introduces named 
> parameters (and makes some of them optional if we can have sensible 
> defaults for them).

And I'm perfect happy to review those changes, but don't expect much new 
code from me (unless I get an itch I can't scratch while building the 
tests).  Initially, I'll focus on getting the two existing patches ready 
to merge to trunk; I'll stay out of your way on the named parameters piece.

> This change would also introduce an external dependency on 
> Params::Validate.  I've bought this up before, and there didn't seem to 
> be any objection to introducing this dependency, so I hope that will be 
> fairly non contentious.

As long as the dependencies are fairly minimal, I think we can make the 
argument that this is a reasonable tradeoff.

> A thought.  Do we gain anything by instead switching to Module::Build?  
> I have no idea, since I've not used it when building and binding against 
> external libraries.

As much as I love Module::Build (most of my modules use it), it is not 
core Perl (until v5.10.0), so it is harder to argue that M::B and the 
dependencies needed to get it to build C code are minimal enough to come 
under the previous paragraph above.

>  * Make sure that, on a per-method basis, the bindings can find out which
>    svn version a method was introduced (or otherwise be able to audit a
>    piece of code and say "This requires svn 1.4.0 as a minimum version")

Perhaps we could extract that information from the Doxygen comments and 
generate a module during the build that had that information.  Have to 
work out the appropriate API (which might involve changing the existing 
bindings wrapper)...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Nik Clayton <ni...@ngo.org.uk>.
John,

[copying the dev list so that this is archived, and others can chime in]

John Peacock wrote:
> I see that Daniel has already created a branch for the Perl bindings 
> improvements.  I propose that we start by going through the open issues 
> for the Perl bindings and apply the following two patches:
> 
>     http://subversion.tigris.org/issues/show_bug.cgi?id=2632
>     http://subversion.tigris.org/issues/show_bug.cgi?id=2646

I see you've committed 2646.  Are you planning on closing the ticket too 
(I've not poked around tigris.org yet, so I need to find out how to do that).

The patch in 2632 could use a little work.  I'd remove the "I've not tested 
this" comments, and the examples should probably go in to a separate 
directory of example programs that use the bindings (or be used as test 
scripts).

> and then review the remaining API's that are not already exported.  Then 
> Nik and I can split up the documentation and start backfilling.  I would 
> like to think this part may go fairly quickly, and we can get those 
> changes ported back to trunk sooner rather than later.

The major change that I've started is the one that introduces named 
parameters (and makes some of them optional if we can have sensible defaults 
for them).

That can go in piece by piece -- there's no reason why every function needs 
to support this all in one commit, although we probably wouldn't want to 
merge the changes back to trunk until every function in a file had been 
changed in that way.

This change would also introduce an external dependency on Params::Validate. 
  I've bought this up before, and there didn't seem to be any objection to 
introducing this dependency, so I hope that will be fairly non contentious.

This touches SVN::Client.  If you've got no plans in that area for the next 
few days I'll prepare something on the train tomorrow.

If I really had my head I'd bring in Exception::Class as well, and use the 
two of them together.  See

http://jc.ngo.org.uk/blog/2007/01/15/perl-parameter-validation-and-error-handling/

for details.  Exception::Class has a bigger dependency list though, and I 
expect that to be too much for the userbase, at least for the moment.

> The second big task should be (IMHO) to focus on the testsuite, and see 
> if we can beef up the testing to be comparable to what the Python tests 
> currently cover.  I view this as my opportunity to learn more about a 
> foreign language where whitespace is significant... ;-)

Inline::Python :-)

Improving the test suite definitely makes sense as another task to carry out.

> The two Makefile.pl related problems are likely to require a little more 
> thought:
> 
>     http://subversion.tigris.org/issues/show_bug.cgi?id=2479
>     http://subversion.tigris.org/issues/show_bug.cgi?id=2617
> 
> since ExtUtils::MakeMaker is "a maze of twisty passages, all alike" and 
> will actually be harder to deal with than the bindings themselves.  We 
> aren't going to lose [much] by doing these last, since at worst we are 
> maintaining the status quo.  I have to do some heavy EU::MM hacking in 
> the near future (to add support for my version.pm module), so I may be 
> more able to understand what needs doing here after I dissect EU::MM for 
> a while.

I'm perfectly happy to let you delve in to EU::MM.

A thought.  Do we gain anything by instead switching to Module::Build?  I 
have no idea, since I've not used it when building and binding against 
external libraries.

Other things that I'd like to investigate (the answers to some of these may 
"You can already do that" -- that's fine, I just haven't investigated enough 
to know that yet)

  * Make sure the Perl bindings can determine their version

  * Make sure that, on a per-method basis, the bindings can find out which
    svn version a method was introduced (or otherwise be able to audit a
    piece of code and say "This requires svn 1.4.0 as a minimum version")

  * Re-implement svn(1) in Perl.  As well as exercising the bindings this
    should:

    a) Act as a good example for anyone who wants to use the bindings, and
       is wondering how to achieve a particular result.

    b) Provide a test bed for people to experiment with new options and/or
       functionality in the svn client -- essentially, prototyping changes
       before they go in to svn.c...

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by John Peacock <jp...@rowman.com>.
Nik Clayton wrote:
> Daniel Rall wrote:
>> I'd certainly be willing to go out on a limb and sponsor such a branch
>> for at least you and John, Nik.
> 
> Thanks Dan -- I'm happy to take you up on the offer.

And I can help as much as I can, which will be more than just reading the code
and probably less than producing a fully functional test suite.  I've got a lot
of irons in the fire, but this is definitely a way that I can give back to the
project in a useful way...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Nik Clayton <ni...@ngo.org.uk>.
Daniel Rall wrote:
> On Fri, 12 Jan 2007, Nik Clayton wrote:
>> I'm not entirely sure how we break this deadlock.  My preferred approach 
>> would be for those of us who have expressed an interest (that would be at 
>> least you John, me, and Mattias Engdegard) to be given a commit bit for a 
>> *branch* of the repo expressly for the purpose of working on the Perl 
>> bindings so we can get some of these changes in front of a wider audience. 
>> That plus a dev-perl mailing list is probably all we need to start with.
>>
>> That is, of course, entirely at the discretion of the Subversion 
>> maintainers.
> 
> I'd love to sponsor such a branch, but can offer only limited review
> (I prefer languages which don't look like line noise ;).  That said,
> I'd certainly be willing to go out on a limb and sponsor such a branch
> for at least you and John, Nik.

Thanks Dan -- I'm happy to take you up on the offer.

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Daniel Rall <dl...@collab.net>.
On Fri, 12 Jan 2007, Nik Clayton wrote:
...
> The root problem seems to be that we have a number of non-committers who 
> are interested in improving the state of the Perl bindings, but no 
> committers who have the time and the Perl knowledge necessary to provide a 
> sensible review of the changes that we're proposing.
> 
> So it's something of a chicken/egg situation.
> 
> I'm not entirely sure how we break this deadlock.  My preferred approach 
> would be for those of us who have expressed an interest (that would be at 
> least you John, me, and Mattias Engdegard) to be given a commit bit for a 
> *branch* of the repo expressly for the purpose of working on the Perl 
> bindings so we can get some of these changes in front of a wider audience. 
> That plus a dev-perl mailing list is probably all we need to start with.
> 
> That is, of course, entirely at the discretion of the Subversion 
> maintainers.

I'd love to sponsor such a branch, but can offer only limited review
(I prefer languages which don't look like line noise ;).  That said,
I'd certainly be willing to go out on a limb and sponsor such a branch
for at least you and John, Nik.

 - Dan

Re: Perl swig bindings starting to smell

Posted by Nik Clayton <ni...@ngo.org.uk>.
John Peacock wrote:
> Miller, Eric wrote:
>> Is anyone working on, or interested in working on bringing the perl 
>> swig bindings up to date?
>>
>> They look like they are well past their expiration date.
[...]
> Nik Clayton was working with adding named parameter support (but I've 
> lost track of where that stands).  Mattias Engdegard recently submitted 
> a patch to add a bunch more client functions, but it doesn't appear to 
> have been committed.  I don't think your characterization of the code is 
> really all that accurate.  It's clear that the core committers need to 
> get back to the practice of keeping on top of submitted patches.

My patches are still around, but not applied.  No one on the list stepped up 
to review them, and although I sent them to clkao and ben@reser.org for 
review too I've not heard back from them either.

Lest this be interpreted as whining, it's not.  I'm fully aware of how open 
source development works, and how we all have our own lives to lead too, I'm 
as guilty of that as the next man.

The root problem seems to be that we have a number of non-committers who are 
interested in improving the state of the Perl bindings, but no committers 
who have the time and the Perl knowledge necessary to provide a sensible 
review of the changes that we're proposing.

So it's something of a chicken/egg situation.

I'm not entirely sure how we break this deadlock.  My preferred approach 
would be for those of us who have expressed an interest (that would be at 
least you John, me, and Mattias Engdegard) to be given a commit bit for a 
*branch* of the repo expressly for the purpose of working on the Perl 
bindings so we can get some of these changes in front of a wider audience. 
That plus a dev-perl mailing list is probably all we need to start with.

That is, of course, entirely at the discretion of the Subversion maintainers.

For what it's worth I'll be at the UK Subversion User Group meeting next 
week 
(http://jc.ngo.org.uk/blog/2007/01/12/subversion-uk-user-group-google-open-source-jam-18th-january-2007/). 
  I note that C. Michael Pilato will also be there.  Are any other 
Subversion committers attending?  Perhaps we could discuss this over a drink 
after the meeting?

N

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by John Peacock <jp...@rowman.com>.
Miller, Eric wrote:
> Is anyone working on, or interested in working on bringing the perl swig 
> bindings up to date?
> 
> They look like they are well past their expiration date.

Are you using trunk code or 1.4.x?  The reason I ask is that there has 
been a lot of activity to improved both the interface (adding new 
methods that have been added) as well as the documentation.  If the Perl 
bindings seem stale, it is primarily because there isn't a core 
developer to champion them at the moment.  The nature of SWIG (as I 
understand) it is that mostly maintenance work needs to be done (making 
sure that new interfaces are added to the Perl-level exports), since 
SWIG is doing all of the heavy lifting already.  I know that there were 
a bunch of commits in the middle of December to make sure that SVK had 
access to the faster ra_replay code.

Nik Clayton was working with adding named parameter support (but I've 
lost track of where that stands).  Mattias Engdegard recently submitted 
a patch to add a bunch more client functions, but it doesn't appear to 
have been committed.  I don't think your characterization of the code is 
really all that accurate.  It's clear that the core committers need to 
get back to the practice of keeping on top of submitted patches.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by John Peacock <jp...@rowman.com>.
Geoff Richards wrote:
> I don't know what the current state of the actual code is like, such as
> whether it's up to date with additions to the API, but more work on the
> tests and documentation would likely bring such problems to light.

It's too bad this project seems to have faltered:

	http://perthon.sourceforge.net/

else we could just run the Python bindings tests under Perl... ;-)

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Perl swig bindings starting to smell

Posted by Geoff Richards <qe...@ungwe.org>.
On Wed, Jan 10, 2007 at 03:38:21PM -0800, Miller, Eric wrote:
>
> Is anyone working on, or interested in working on bringing the perl
> swig bindings up to date?
> 
> They look like they are well past their expiration date.
> 
> I've been adding things that I need (status2 support), but it is a
> currently beyond my means to do a comprehensive update.

There were definitely issues last time I looked at this stuff.  I've had
problems building the Perl bindings at times, but it's entirely possible
that was my fault.

I'm a bit busy for now, but I'd like to do some tidying up work on the
Perl stuff.  Some of the documentation needs filling in, and I think a
much more thorough test suite would also be useful.  I'll try to find
the time to do some work on these, but I won't complain if anyone wants
to jump in ahead of me :-)

I don't know what the current state of the actual code is like, such as
whether it's up to date with additions to the API, but more work on the
tests and documentation would likely bring such problems to light.


-- 

--- Geoff Richards -------------><-------------- http://ungwe.org/ ---
"I tried to fling my shadow at the moon,
 The while my blood leapt with a wordless song."  --  Theodore Roethke

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org