RDoc problems

D

Damphyr

It all started with me using the Rake::RDocTask:

Rake::RDocTask.new do |rd|
rd.title="rrt_ruby"
rd.rdoc_dir=File.join(SOURCEDIR,"site/rdoc")
rd.rdoc_files.include( "lib/**/*.rb")
end

dies with the following:
d:\projects\rrt_ruby>rake rdoc
(in d:/projects/rrt_ruby)
rm -r D:/projects/rrt_ruby/site/rdoc
rdoc -o D:/projects/rrt_ruby/site/rdoc --title 'rrt_ruby' -T 'html'
lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb lib/rrt_ruby/rrt_component.rb
lib/rrt_ruby/rrt_deployment.rb lib/rrt_ruby/rrt_generic.rb
lib/rrt_ruby/rrt_logical.rb
rake aborted!
undefined method `exitstatus' for nil:NilClass

Taking the rdoc command line from there I get the following:

d:\projects\rrt_ruby>rdoc -o D:/projects/rrt_ruby/site/rdoc --title
'rrt_ruby' -T 'html' lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb
lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb
lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb

rrt_ruby.rb: mc
riva_ruby.rb: mm.
rrt_component.rb: mmc..c..c..m......c
Generating HTML...

Files: 3
Classes: 5
Modules: 6
Methods: 13
Elapsed: 1.001s

Which is plain wrong, since I have 5 files to produce RDoc from.
Now, if I remove the --title option, RDoc does it's job no problem.
As you probably deduced I'm on Windows.
Ruby says
ruby 1.8.2 (2004-12-25) [i386-mswin32]
Any hints as to what goes wrong?
Cheers,
V.-


--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
 
S

Stefan Lang

It all started with me using the Rake::RDocTask:

Rake::RDocTask.new do |rd|
rd.title="rrt_ruby"
rd.rdoc_dir=File.join(SOURCEDIR,"site/rdoc")
rd.rdoc_files.include( "lib/**/*.rb")
end

dies with the following:
d:\projects\rrt_ruby>rake rdoc
(in d:/projects/rrt_ruby)
rm -r D:/projects/rrt_ruby/site/rdoc
rdoc -o D:/projects/rrt_ruby/site/rdoc --title 'rrt_ruby' -T 'html'
lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb
lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb
lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb
rake aborted!
undefined method `exitstatus' for nil:NilClass

Taking the rdoc command line from there I get the following:

d:\projects\rrt_ruby>rdoc -o D:/projects/rrt_ruby/site/rdoc --title
'rrt_ruby' -T 'html' lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb
lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb
lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb

rrt_ruby.rb: mc
riva_ruby.rb: mm.
rrt_component.rb: mmc..c..c..m......c
Generating HTML...

Files: 3
Classes: 5
Modules: 6
Methods: 13
Elapsed: 1.001s

Which is plain wrong, since I have 5 files to produce RDoc from.
Now, if I remove the --title option, RDoc does it's job no problem.
As you probably deduced I'm on Windows.
Ruby says
ruby 1.8.2 (2004-12-25) [i386-mswin32]
Any hints as to what goes wrong?
Cheers,
V.-

This could be fixed in rake. I posted a solution once.
Some options for you:

* Replace the Rake::RDocTask with:

task "rdoc" do
require 'rdoc/rdoc'
# give the same arguments as to rdoc from commandline
# try "rdoc --help"
RDoc::RDoc.new.document(%w(--title rrt_ruby -T html .....))
end

(The problem with invoking rdoc from the commandline on
Windows is, that a batch file is the start script which
takes only 8 (or something like that) arguments.)

* Use Rant: http://make.ruby-co.de
It's easy to convert a Rakefile to a Rantfile.

HTH,
Stefan
 
D

Damphyr

Stefan said:
It all started with me using the Rake::RDocTask:

Rake::RDocTask.new do |rd| rd.title="rrt_ruby"
rd.rdoc_dir=File.join(SOURCEDIR,"site/rdoc") rd.rdoc_files.include(
"lib/**/*.rb") end

dies with the following: d:\projects\rrt_ruby>rake rdoc (in
d:/projects/rrt_ruby) rm -r D:/projects/rrt_ruby/site/rdoc rdoc -o
D:/projects/rrt_ruby/site/rdoc --title 'rrt_ruby' -T 'html'
lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb
lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb
lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb rake
aborted! undefined method `exitstatus' for nil:NilClass

Taking the rdoc command line from there I get the following:

d:\projects\rrt_ruby>rdoc -o D:/projects/rrt_ruby/site/rdoc --title
'rrt_ruby' -T 'html' lib/rrt_ruby.rb lib/rrt_ruby/riva_ruby.rb
lib/rrt_ruby/rrt_component.rb lib/rrt_ruby/rrt_deployment.rb
lib/rrt_ruby/rrt_generic.rb lib/rrt_ruby/rrt_logical.rb

rrt_ruby.rb: mc riva_ruby.rb: mm. rrt_component.rb:
mmc..c..c..m......c Generating HTML...

Files: 3 Classes: 5 Modules: 6 Methods: 13 Elapsed: 1.001s

Which is plain wrong, since I have 5 files to produce RDoc from.
Now, if I remove the --title option, RDoc does it's job no problem.
As you probably deduced I'm on Windows. Ruby says ruby 1.8.2
(2004-12-25) [i386-mswin32] Any hints as to what goes wrong?
Cheers, V.-


This could be fixed in rake. I posted a solution once. Some options
for you:

* Replace the Rake::RDocTask with:

task "rdoc" do require 'rdoc/rdoc' # give the same arguments as to
rdoc from commandline # try "rdoc --help"
RDoc::RDoc.new.document(%w(--title rrt_ruby -T html .....)) end

(The problem with invoking rdoc from the commandline on Windows is,
that a batch file is the start script which takes only 8 (or
something like that) arguments.)
Oooops, I should have counted (it's that having 5 files you don't count
the --options :) ). I can always do some pasta code that counts the
arguments and loops so that the batch file is always called right.
What I find wierd is that RDocTask is using the batchfile in rake and
not the RDoc class.
Fixing it should be easier than doing spaghetti.
* Use Rant: http://make.ruby-co.de It's easy to convert a Rakefile to
a Rantfile.
Stefan you've done a great job, but purely through momentum I find it
myself easier to write an RDoc task for Rake than a Gem Task for Rant
(objectively it's the same effort - as I said, it's only momentum)
Cheers,
V.-
--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
 
D

Damphyr

Stefan said:
]
Stefan you've done a great job, but purely through momentum I find
it myself easier to write an RDoc task for Rake than a Gem Task for
Rant (objectively it's the same effort - as I said, it's only
momentum) Cheers,
V.-


Have you read
http://make.rubyforge.org/files/doc/rubyproject_rdoc.html
?

Rant creates zip/tgz/gem packages on Linux, MacOS X, Windows
(and probably most other systems where ruby runs).
Nope I hadn't, but at the rate I am reading these days something will
happen to me (there's smoke coming out of my ears I think :) ).
Will do. At the moment I have a different problem with Rake which I
would also like to test with Rant:
task A depends on task B
task B runs and changes (i.e. adds C and D) the prerequisites of task A.
Do tasks C and D run? With Rake they don't (well I say they don't, Jim
might have a different opinion).
I'm probably going to test it with rant, but I think this merrits a
differnet thread :)
Cheers,
V.-
--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
 
S

Stefan Lang

Stefan Lang wrote: [...]
Nope I hadn't, but at the rate I am reading these days something
will happen to me (there's smoke coming out of my ears I think :)
). Will do. At the moment I have a different problem with Rake
which I would also like to test with Rant:
task A depends on task B
task B runs and changes (i.e. adds C and D) the prerequisites of
task A. Do tasks C and D run? With Rake they don't (well I say they
don't, Jim might have a different opinion).
I'm probably going to test it with rant, but I think this merrits a
differnet thread :)
Cheers,
V.-

If I understand correctly, Rant does what you want:

$ cat Rantfile
@print = lambda { |t| puts t.name }

task :A => :B, &@print
task :B do |t|
enhance :A => [:C, :D]
@print[t]
end
task :C, &@print
task :D, &@print
$ rant A
B
C
D
A

A somewhat equivalent Rakefile could look like:
$ cat Rakefile
@print = lambda { |t| puts t.name }

task :A => :B, &@print
task :B do |t|
file :A => [:C, :D]
@print[t]
end
task :C, &@print
task :D, &@print
$ rake A
(in /home/stefan/tmp/rant-dyn-dep.t)
B
A

Kind regards,
Stefan
 
D

Damphyr

Stefan said:
On Wednesday 05 October 2005 17:54, Damphyr wrote:
=20
Stefan Lang wrote: =20
[...]
=20
Nope I hadn't, but at the rate I am reading these days something
will happen to me (there's smoke coming out of my ears I think :)
). Will do. At the moment I have a different problem with Rake
which I would also like to test with Rant:
task A depends on task B
task B runs and changes (i.e. adds C and D) the prerequisites of
task A. Do tasks C and D run? With Rake they don't (well I say they
don't, Jim might have a different opinion).
I'm probably going to test it with rant, but I think this merrits a
differnet thread :)
Cheers,
V.-
=20
=20
If I understand correctly, Rant does what you want:
=20
$ cat Rantfile
@print =3D lambda { |t| puts t.name }
=20
task :A =3D> :B, &@print
task :B do |t|
enhance :A =3D> [:C, :D]
@print[t]
end
task :C, &@print
task :D, &@print
$ rant A
B
C
D
A
=20
A somewhat equivalent Rakefile could look like:
$ cat Rakefile
@print =3D lambda { |t| puts t.name }
=20
task :A =3D> :B, &@print
task :B do |t|
file :A =3D> [:C, :D]
@print[t]
end
task :C, &@print
task :D, &@print
$ rake A
(in /home/stefan/tmp/rant-dyn-dep.t)
B
A
=20
Yeap, that's it. Hehe, so nice to just describe a problem and have it=20
solved.
Thanks for sparing me the tryout.
I guess I'll have to find the time to make conversions (unless Jim fixes=20
the above - another case of Unversch=E4mtheit)
Cheers,
V.-
--=20
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7=EB=
=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5.
http://www.freemail.gr - free email service for the Greek-speaking.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top