ruby-prof / ruby-prof

A ruby profiler. See https://ruby-prof.github.io for more information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to build documentation using rdoc 6.0.4

Apteryks opened this issue · comments

When attempting to build ruby-prof 1.4.1 on GNU Guix, it fails building its doc like:

 77% [52/67]  lib/ruby-prof/printers/abstract_printer.rb
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/ruby -c lib/ruby-prof/printers/abstract_printer.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NoMethodError) undefined method `[]' for nil:NilClass

ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]' for nil:NilClass

Running the suggested check yields:

$ /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/ruby -c lib/ruby-prof/printers/abstract_printer.rb
Syntax OK

The GEM_PATH in use is:

echo $GEM_PATH 
/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/vendor_ruby:/gnu/store/axnadsqwjm801nz4n3bd38i13v6wln8y-bundler-1.17.3/lib/ruby/vendor_ruby:/gnu/store/xhsz8j8hxjxml19f9750arqilf9lwjnr-ruby-minitest-5.11.3/lib/ruby/vendor_ruby:/gnu/store/garm6rawpbi776xmc478byicbyprv9sx-ruby-rake-compiler-1.1.0/lib/ruby/vendor_ruby:/gnu/store/8pp6zjxgv60zmkc036ga8764zvyhqayl-ruby-rdoc-6.0.4/lib/ruby/vendor_ruby

Perhaps useful:

rdoc --debug lib/ruby-prof/printers/abstract_printer.rb
Parsing sources...
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/ruby -c lib/ruby-prof/printers/abstract_printer.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (NoMethodError) undefined method `[]' for nil:NilClass

/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:496:in `heredoc_end?'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:473:in `get_heredoc_tk'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:346:in `get_squashed_tk'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:578:in `parse'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ruby.rb:180:in `initialize'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser.rb:191:in `new'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser.rb:191:in `for'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:360:in `parse_file'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:416:in `block in parse_files'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:414:in `map'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:414:in `parse_files'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:483:in `document'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/gems/2.6.0/gems/rdoc-6.1.2/exe/rdoc:20:in `<top (required)>'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/rdoc:23:in `load'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/rdoc:23:in `<main>'
undefined method `[]' for nil:NilClass
/gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:496:in `heredoc_end?'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:473:in `get_heredoc_tk'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:346:in `get_squashed_tk'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:578:in `parse'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser/ruby.rb:180:in `initialize'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser.rb:191:in `new'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/parser.rb:191:in `for'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:360:in `parse_file'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:416:in `block in parse_files'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:414:in `map'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:414:in `parse_files'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/2.6.0/rdoc/rdoc.rb:483:in `document'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/lib/ruby/gems/2.6.0/gems/rdoc-6.1.2/exe/rdoc:20:in `<top (required)>'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/rdoc:23:in `load'
        /gnu/store/8ql9jjzl8q291ghsxlkm1wn5bpdvgcqw-ruby-2.6.5/bin/rdoc:23:in `<main>'

Updated rdoc to 6.2.0 and it resolved the issue. Closing, sorry for the noise.

Cool. Thanks for the note though.