coatl / rubylexer

RubyLexer is a hyper-correct lexer library for Ruby, written in Ruby.
http://rubyforge.org/projects/rubylexer/
GNU Lesser General Public License v2.1
14 stars 2 forks source link

kills rdoc #4

Closed rdp closed 14 years ago

rdp commented 15 years ago

probably not the fault of rubylexer, but something worth looking at.

Installing ri documentation for rubylexer-0.7.5...

RDoc failure in lib/rubylexer/test/oneliners.rb at or around line 395 column 5

Before reporting this, could you check that the file you're documenting compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if fed invalid programs.

The internal error was:

C:/Ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:1699:in +': can't convert nil into String (TypeError) from C:/Ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:1699:inget_tk' from C:/Ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:2868:in skip_tkspace' from C:/Ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:2544:inparse_statements'

coatl commented 15 years ago

I believe I successfully worked around this problem by judicious use of .document files in the latest git edge code. (Not released yet.)

rdp commented 15 years ago

here's my latest...[with rdoc 2.4.3]

D:\dev\coatl\rubylexer>gem rdoc --rdoc rubylexer Installing RDoc documentation for rubylexer-0.7.6...

RDoc failure in lib/rubylexer/test/oneliners.rb at or around line 395 column 5

Before reporting this, could you check that the file you're documenting compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if fed invalid programs.

The internal error was:

c:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:1699:in +': can't convert nil into String (TypeError) from c:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:1699:inget_tk' from c:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:2868:in skip_tkspace' from c:/ruby/lib/ruby/gems/1.8/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb:2544:inparse_statements'

coatl commented 15 years ago

um. I believe when you run 'gem rdoc rubylexer', it tries to generate documentation for whatever rubylexer gem you have installed. It does not use the files in the current directory. So, yeah, you tried to generate rdocs for the rubylexer gem and that failed because the fix to make rdoc ignore oneliners.rb didn't get into the last gem release. To test if this is fixed in git, you need to run just rdoc, no gem, in an up-to-date rubylexer working dir.

Edge git code works for me with both rdoc versions 1.0.1 and 2.4.3.

coatl commented 14 years ago

This should be fixed now in the latest release. Lemme know if not.

rdp commented 14 years ago

seems to work like a champ now

coatl commented 14 years ago

awesome. closing this.