Re: [libxml-devel] running tests from svn

2008-07-11 Thread Trans
On Jul 11, 4:21 pm, "Aaron Patterson" <[EMAIL PROTECTED]> wrote: > IMO, it seems like more work than its worth to support the few people > that don't have rake installed.  If a user has to make sure that gcc, > libxml, libiconv, zlib, ruby, etc are installed, why not rake? That's not the main i

Re: [libxml-devel] [ libxml-Bugs-8337 ] Opening many files causes segfault on fbsd-amd64

2008-07-11 Thread Masashi Shimbo
Hello Sean and Charlie, >> Well, File.open is a ruby method while Document.open is a libxml method. >> Perhaps Ruby has some smarts built into it with File.open and the garbage >> collector. > > Ruby does the same thing libxml now does, it calls the GC whenever errno is > set to EMFILE or ENFILE.

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 11:47 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> 130 tests, 716 assertions, 1 failures, 0 errors >>> rake aborted! >>> Command failed with status (1): [/opt/local/bin/ruby -Ilib:test:ext >>> "/opt/l...] >>> >>> (See full trace by running task with --trace) >>> Exit 1

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 1:07 PM, Trans <[EMAIL PROTECTED]> wrote: > > On Jul 11, 3:21 pm, "Aaron Patterson" <[EMAIL PROTECTED]> > wrote: > >> Separate scripts are more intuitive than rake tasks? > > I understand what you thinking, but there are some considerations > involved. The reason we should u

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Trans
On Jul 11, 3:21 pm, "Aaron Patterson" <[EMAIL PROTECTED]> wrote: > Separate scripts are more intuitive than rake tasks? I understand what you thinking, but there are some considerations involved. The reason we should use scripts rather than the Rakefile (whether it be via the traditional setup.r

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
Separate scripts are more intuitive than rake tasks? I agree with Aaron in terms of usability... though I think setup.rb should be implemented in terms of rake tasks since setup.rb < rake functionality. Granted that's not what exists in code -sc -- Sean Chittenden [EMAIL PROTECTED]

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 12:15 PM, Trans <[EMAIL PROTECTED]> wrote: > > > On Jul 11, 1:45 pm, "Aaron Patterson" <[EMAIL PROTECTED]> > wrote: > >> I've added a patch to the tracker that adds a test task and a build >> task to the rake file. >> >> http://rubyforge.org/tracker/index.php?func=detail&ai

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Trans
On Jul 11, 1:45 pm, "Aaron Patterson" <[EMAIL PROTECTED]> wrote: > I've added a patch to the tracker that adds a test task and a build > task to the rake file. > >  http://rubyforge.org/tracker/index.php?func=detail&aid=21172&group_id... > > If you apply that patch, you can just execute 'rake bu

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Trans
On Jul 11, 12:45 pm, "Aaron Patterson" <[EMAIL PROTECTED]> wrote: > On Fri, Jul 11, 2008 at 9:33 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: > >>> Not sure, I run ruby test/test_suite.rb. > > >> Looks like the test suite must be run from within the test directory. > >> Otherwise test assets wi

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
130 tests, 716 assertions, 1 failures, 0 errors rake aborted! Command failed with status (1): [/opt/local/bin/ruby -Ilib:test:ext "/opt/l...] (See full trace by running task with --trace) Exit 1 Yes, I think that is because of the implementation of register_error_handler. I had fixed this in o

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 10:54 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> Wild. Alright. It works for me out of the box. Is this trunk or before >>> the libxml.rb patch? -sc >> >> setup.rb has never successfully run the tests for me, even before the >> libxml.rb patch. I'm on OS X. > >

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
Wild. Alright. It works for me out of the box. Is this trunk or before the libxml.rb patch? -sc setup.rb has never successfully run the tests for me, even before the libxml.rb patch. I'm on OS X. Strange. I'm OS-X and here's my output with trunk. -sc % rake test (in /Users/sean/src

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 10:46 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> Can you try with just `./setup.rb test` ? I'm cautious about updating >>> lib/libxml.rb simply because it's included by everything and I'm still >>> not >>> up to speed post-gem'ification re: path/packaging. >> >> [EM

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
Can you try with just `./setup.rb test` ? I'm cautious about updating lib/libxml.rb simply because it's included by everything and I'm still not up to speed post-gem'ification re: path/packaging. [EMAIL PROTECTED] libxml]$ ./setup.rb test /Users/aaron/svn/libxml/test/tc_well_formed.rb:1:in

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 9:52 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> Ha! I just committed something nearly identical to this because I >>> couldn't >>> run the tests using ./setup.rb test. I didn't use the constant, however >>> and >>> did the File.join(...) for each open call. Anyway

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 9:52 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: [snip] > Can you try with just `./setup.rb test` ? I'm cautious about updating > lib/libxml.rb simply because it's included by everything and I'm still not > up to speed post-gem'ification re: path/packaging. [EMAIL PRO

Re: [libxml-devel] implementing in Ruby vs C

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 9:41 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> I'm not entirely opposed to the idea... but am curious for some example >>> functions. :) -sc >> >> XML::Parser.register_error_handler could be implemented in ruby. >> ruby_xml_attr_not_type_name() could be implemente

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
Ha! I just committed something nearly identical to this because I couldn't run the tests using ./setup.rb test. I didn't use the constant, however and did the File.join(...) for each open call. Anyway, let me know if trunk works for the tests for you now. -sc The tests still do not wor

Re: [libxml-devel] implementing in Ruby vs C

2008-07-11 Thread Sean Chittenden
I'm not entirely opposed to the idea... but am curious for some example functions. :) -sc XML::Parser.register_error_handler could be implemented in ruby. ruby_xml_attr_not_type_name() could be implemented in ruby. All of the rb_define_consts in ruby_xml_node.c ruby_xml_node_set_xpath_get(

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 9:33 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >>> Not sure, I run ruby test/test_suite.rb. >> >> Looks like the test suite must be run from within the test directory. >> Otherwise test assets will not be found. I've added a patch to the >> tracker that figures out whe

Re: [libxml-devel] [ libxml-Bugs-8337 ] Opening many files causes segfault on fbsd-amd64

2008-07-11 Thread Sean Chittenden
Ah, good idea. It just retries once after doing a GC? Yup. Have time to turn this into a test case? Done. I also cleaned up the tests so that they almost all pass now. If you're opening files in tests, use something akin to: File.open(File.join(File.dirname(__FILE__), 'model/foo.xml')

Re: [libxml-devel] implementing in Ruby vs C

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 8:52 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >> As I've started reading through the libxml-ruby code, I have run >> across methods implemented in C that could be implemented in Ruby. I >> would like to change them to be implemented in Ruby. Is anyone >> opposed to t

Re: [libxml-devel] running tests from svn

2008-07-11 Thread Sean Chittenden
Not sure, I run ruby test/test_suite.rb. Looks like the test suite must be run from within the test directory. Otherwise test assets will not be found. I've added a patch to the tracker that figures out where the assets directory is so that you can run the tests from a different directory (e.g.

Re: [libxml-devel] [ libxml-Bugs-8337 ] Opening many files causes segfault on fbsd-amd64

2008-07-11 Thread Sean Chittenden
So I don't see this as a bug in the libxml bindings. Maybe you are right, but if I change XML::Document.file("test.xml") to File.open("test.xml"), I won't run out of file handles. I wonder what makes the difference... Well, File.open is a ruby method while Document.open is a libxml method. P

Re: [libxml-devel] implementing in Ruby vs C

2008-07-11 Thread Aaron Patterson
On Fri, Jul 11, 2008 at 8:52 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote: >> As I've started reading through the libxml-ruby code, I have run >> across methods implemented in C that could be implemented in Ruby. I >> would like to change them to be implemented in Ruby. Is anyone >> opposed to t

Re: [libxml-devel] implementing in Ruby vs C

2008-07-11 Thread Sean Chittenden
As I've started reading through the libxml-ruby code, I have run across methods implemented in C that could be implemented in Ruby. I would like to change them to be implemented in Ruby. Is anyone opposed to that? I think it would make coding easier, less buggy, and more fun! I'm not entirel

[libxml-devel] [ libxml-Bugs-21169 ] each_attr is broken in 0.7.0

2008-07-11 Thread noreply
Bugs item #21169, was opened at 2008-07-11 14:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21169&group_id=494 Category: General Group: None Status: Open Resolution: None Priority: 3 Submitted By: Tiago Macedo (tmacedo) Assigned to: Nobody (None) Summary:

[libxml-devel] [ libxml-Bugs-21169 ] each_attr is broken in 0.7.0

2008-07-11 Thread noreply
Bugs item #21169, was opened at 2008-07-11 14:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=21169&group_id=494 Category: General Group: None Status: Open Resolution: None Priority: 3 Submitted By: Tiago Macedo (tmacedo) Assigned to: Nobody (None) Summary:

[libxml-devel] [ libxml-Bugs-19648 ] rake install DESTDIR fails

2008-07-11 Thread noreply
Bugs item #19648, was opened at 2008-04-19 10:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19648&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Benjamin Reed (rangerrick) >Assigned to: Sean Chitten

Re: [libxml-devel] SaxParser

2008-07-11 Thread Todd Fisher
Hi Charlie, I guess what I'm wondering is how can the data from ruby be fed into libxml-ruby SaxParser - when I only see 2 methods for passing data, parser.string= and parser.filename= . I must be missing understanding. Thanks, Todd 2008/7/10 Charlie Savage <[EMAIL PROTECTED]>: > Hi Todd, > >