[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

building rdocs for Rake

Joel VanderWerf

3/5/2005 9:33:00 PM


I'm trying to build the rdocs for rake (0.4.15, from gem, ruby 1.8.2),
but it's failing to find the jamis template:

# rake rdoc
(in /usr/local/lib/ruby/gems/1.8/gems/rake-0.4.15)
rm -r html
rdoc -o html --line-numbers --inline-source --main README --title 'Rake
-- Ruby Make' -T 'jamis' README MIT-LICENSE TODO CHANGES lib/rake.rb
lib/rake/clean.rb lib/rake/tasklib.rb lib/rake/packagetask.rb
lib/rake/rdoctask.rb lib/rake/runtest.rb lib/rake/testtask.rb
lib/rake/gempackagetask.rb doc/glossary.rdoc doc/proto_rake.rdoc
doc/rational.rdoc doc/rakefile.rdoc doc/release_notes/rake-0.4.14.rdoc

README:
MIT-LICENSE:
TODO:
CHANGES:
rake.rb:
c.........c.........c.......m....m....mc...............c...c............
clean.rb:
tasklib.rb: mc..
packagetask.rb: mc.......
rdoctask.rb: mc.....
runtest.rb: m.
testtask.rb: mc.....
gempackagetask.rb: mc....
glossary.rdoc:
proto_rake.rdoc:
rational.rdoc:
rakefile.rdoc:
rake-0.4.14.rdoc:
Generating HTML...
Could not find HTML template 'rdoc/generators/template/html/jamis'
rake aborted!
Command failed with status (99): [rdoc -o html --line-numbers
--inline-source --main README --title 'Rake -- Ruby Make' -T 'jamis'
README MIT-LICENSE TODO CHANGES lib/rake.rb lib/rake/clean.rb
lib/rake/tasklib.rb lib/rake/packagetask.rb lib/rake/rdoctask.rb
lib/rake/runtest.rb lib/rake/testtask.rb lib/rake/gempackagetask.rb
doc/glossary.rdoc doc/proto_rake.rdoc doc/rational.rdoc doc/rakefile.rdoc

There is a jamis.rb file in the doc dir, but either that's not the right
one, or rake rdoc isn't finding it.

Any suggestions?


10 Answers

Joel VanderWerf

3/5/2005 9:57:00 PM

0

Joel VanderWerf wrote:
>
> I'm trying to build the rdocs for rake (0.4.15, from gem, ruby 1.8.2),
> but it's failing to find the jamis template:
...
> There is a jamis.rb file in the doc dir, but either that's not the right
> one, or rake rdoc isn't finding it.
>
> Any suggestions?

Btw, it's ok when I copy jamis.rb into

/usr/local/lib/ruby/1.8/rdoc/generators/template/html/



Jim Weirich

3/5/2005 11:39:00 PM

0

On Saturday 05 March 2005 04:57 pm, Joel VanderWerf wrote:
> Btw, it's ok when I copy jamis.rb into
>
> /usr/local/lib/ruby/1.8/rdoc/generators/template/html/

That is the correct fix.

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Jim Weirich

3/6/2005 12:10:00 AM

0

On Saturday 05 March 2005 06:39 pm, Jim Weirich wrote:
> On Saturday 05 March 2005 04:57 pm, Joel VanderWerf wrote:
> > Btw, it's ok when I copy jamis.rb into
> >
> > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/
>
> That is the correct fix.

I've just updated CVS to only use the jamis template if it is available.

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Joel VanderWerf

3/6/2005 1:31:00 AM

0

Jim Weirich wrote:
> On Saturday 05 March 2005 06:39 pm, Jim Weirich wrote:
>
>>On Saturday 05 March 2005 04:57 pm, Joel VanderWerf wrote:
>>
>>>Btw, it's ok when I copy jamis.rb into
>>>
>>>/usr/local/lib/ruby/1.8/rdoc/generators/template/html/
>>
>>That is the correct fix.
>
>
> I've just updated CVS to only use the jamis template if it is available.

But it is available: it comes with rake! Is it possible to use the local
copy of jamis.rb, as in:

rdoc -T doc/jamis.rb ...


Jim Weirich

3/6/2005 3:06:00 AM

0

On Saturday 05 March 2005 08:30 pm, Joel VanderWerf wrote:
> > I've just updated CVS to only use the jamis template if it is available.
>
> But it is available: it comes with rake! Is it possible to use the local
> copy of jamis.rb, as in:

Duh! For some reason I thought it had to be installed in the rdoc template
directory.

This is a much better solution. Thanks.

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Molitor, Stephen L

3/6/2005 3:08:00 AM

0

I tried using the new postgres composite types features as described in the new manual.

With the following versions:

plruby 0.4.3
postgresql 8.0.1
ruby 1.8.2
Mac OS X 10.3.8 (panther)

when I run the following in psql:

create type t as ( name text );
test=# create function f(t) returns integer as '42' language 'plruby';
select f(ROW('a name'));

I get the following error:
ERROR: catcache reference 0x430388 is not owned by resource owner Portal

However, if I use pl/sql, running this works fine:

create function f2(t) returns integer as 'select 42' language sql;
select f2(ROW('a name'));

I get 42 back.

The error appears to be thrown on line 609 in the function ResourceOwnerForgetCatCacheRef in resowner.c in the postgres 8.0.1 sources. The only place that this method seems to get called is on line 1293 in the function ReleaseCatCache in catcache.c. This is called immediately after it decrements the ref count on the catcache. So maybe there's some sort of reference count leak or something.

I have trouble reproducing it, but using the old syntax with postgres 7.4.7 I would sometimes get warnings about a catcache leak, the error saying something about 'catcache ref count has reached -1'. So I'm guessing the leak has always existing but fails hard with 8.0.

Anyway, any help would be appreciated!

Steve

Molitor, Stephen L

3/6/2005 3:14:00 AM

0

Sorry, minor typo. I copied and pasted from my psql session and forgot to remove all the prompts. Without the prompts, running the following (you can feed it in to psql from the command line) causes the error:

create type t as ( name text );
create function f(t) returns integer as '42' language 'plruby';
select f(ROW('a name'));


Steve


-----Original Message-----
From: Molitor, Stephen L
Sent: Sat 3/5/2005 9:08 PM
To: ruby-talk ML
Subject: plruby bug with postgres 8.0 composite types / ref count leak?

I tried using the new postgres composite types features as described in the new manual.

With the following versions:

plruby 0.4.3
postgresql 8.0.1
ruby 1.8.2
Mac OS X 10.3.8 (panther)

when I run the following in psql:

create type t as ( name text );
test=# create function f(t) returns integer as '42' language 'plruby';
select f(ROW('a name'));

I get the following error:
ERROR: catcache reference 0x430388 is not owned by resource owner Portal

However, if I use pl/sql, running this works fine:

create function f2(t) returns integer as 'select 42' language sql;
select f2(ROW('a name'));

I get 42 back.

The error appears to be thrown on line 609 in the function ResourceOwnerForgetCatCacheRef in resowner.c in the postgres 8.0.1 sources. The only place that this method seems to get called is on line 1293 in the function ReleaseCatCache in catcache.c. This is called immediately after it decrements the ref count on the catcache. So maybe there's some sort of reference count leak or something.

I have trouble reproducing it, but using the old syntax with postgres 7.4.7 I would sometimes get warnings about a catcache leak, the error saying something about 'catcache ref count has reached -1'. So I'm guessing the leak has always existing but fails hard with 8.0.

Anyway, any help would be appreciated!

Steve



Molitor, Stephen L

3/6/2005 4:02:00 AM

0

I *might* have a fix. Changing plruby.c lines 892 - 898 from this:

if (typeStruct->typrelid != InvalidOid) {
prodesc->arg_is_rel[i] = 1;
ReleaseSysCache(typeTup);
}
else {
prodesc->arg_is_rel[i] = 0;
}

to simply this:

prodesc->arg_is_rel[i] = 0;

makes the problem go away. (In other words, removing the != InvalidOid check.)

It seems that the problem isn't a catcache reference leak, but rather releasing the same thing more than once. Of course, my 'fix' might just be introducing a leak in other circumstances, although it does seem to avoid the double release in my test case. I just started peaking at the plruby c code today; haven't really grokked it yet. Anyway, maybe this will help.

To Guy Decoux (plruby author) -- thanks for a pretty slick module. I just started playing with it, but this issue aside, it seems to integrate pretty darn well with postgresql. Ruby and postgresql seem like a good fit.

Steve

-----Original Message-----
From: Molitor, Stephen L
Sent: Sat 3/5/2005 9:13 PM
To: ruby-talk ML
Subject: Re: plruby bug with postgres 8.0 composite types / ref count leak?

Sorry, minor typo. I copied and pasted from my psql session and forgot to remove all the prompts. Without the prompts, running the following (you can feed it in to psql from the command line) causes the error:

create type t as ( name text );
create function f(t) returns integer as '42' language 'plruby';
select f(ROW('a name'));


Steve


-----Original Message-----
From: Molitor, Stephen L
Sent: Sat 3/5/2005 9:08 PM
To: ruby-talk ML
Subject: plruby bug with postgres 8.0 composite types / ref count leak?

I tried using the new postgres composite types features as described in the new manual.

With the following versions:

plruby 0.4.3
postgresql 8.0.1
ruby 1.8.2
Mac OS X 10.3.8 (panther)

when I run the following in psql:

create type t as ( name text );
test=# create function f(t) returns integer as '42' language 'plruby';
select f(ROW('a name'));

I get the following error:
ERROR: catcache reference 0x430388 is not owned by resource owner Portal

However, if I use pl/sql, running this works fine:

create function f2(t) returns integer as 'select 42' language sql;
select f2(ROW('a name'));

I get 42 back.

The error appears to be thrown on line 609 in the function ResourceOwnerForgetCatCacheRef in resowner.c in the postgres 8.0.1 sources. The only place that this method seems to get called is on line 1293 in the function ReleaseCatCache in catcache.c. This is called immediately after it decrements the ref count on the catcache. So maybe there's some sort of reference count leak or something.

I have trouble reproducing it, but using the old syntax with postgres 7.4.7 I would sometimes get warnings about a catcache leak, the error saying something about 'catcache ref count has reached -1'. So I'm guessing the leak has always existing but fails hard with 8.0.

Anyway, any help would be appreciated!

Steve

ts

3/6/2005 10:27:00 AM

0

>>>>> "M" == Molitor, Stephen L <Stephen.L.Molitor@erac.com> writes:

M> I *might* have a fix. Changing plruby.c lines 892 - 898 from this:

You are right, but write it like this

svg% diff -u src/plruby.c~ src/plruby.c
--- src/plruby.c~ 2004-11-22 17:56:05.000000000 +0100
+++ src/plruby.c 2005-03-06 11:19:34.000000000 +0100
@@ -889,13 +889,7 @@
format_type_be(arg_type[i]));
}
prodesc->arg_elem[i] = (Oid) (typeStruct->typelem);
- if (typeStruct->typrelid != InvalidOid) {
- prodesc->arg_is_rel[i] = 1;
- ReleaseSysCache(typeTup);
- }
- else {
- prodesc->arg_is_rel[i] = 0;
- }
+ prodesc->arg_is_rel[i] = (typeStruct->typrelid != InvalidOid);

PLRUBY_BEGIN(1);
prodesc->arg_is_array[i] = 0;
svg%

Thanks,


Guy Decoux


Tom Copeland

3/8/2005 2:27:00 PM

0

> Ruby and postgresql seem like a good fit.

+1 !!

Tom