"rake doc" failure using latest

15 views
Skip to first unread message

Ryan Johnson

unread,
Feb 19, 2010, 2:40:32 PM2/19/10
to PDoc
I've downloaded the latest prototype and pdoc from github, and cannot
build the documentation. I first tried to build docs on a test project
and got a similar failure (specifically "wrong number of arguments (1
for 2)" with the same stack trace ). Is this is a known issue? Quite
interested in using this for ActiveJS. Switched to sprockets yesterday
for the build system and loving it.

Ryan-Johnsons-MacBook-Pro:sstephenson-prototype-6a529ac ryan$ rake doc
--trace
(in /Users/ryan/Downloads/sstephenson-prototype-6a529ac)
** Invoke doc (first_time)
** Invoke doc:build (first_time)
** Invoke doc:require (first_time)
** Execute doc:require
** Execute doc:build
mkdir -p /Users/ryan/Downloads/sstephenson-prototype-6a529ac/test/unit/
tmp
rm -rf /Users/ryan/Downloads/sstephenson-prototype-6a529ac/doc

Parsing source files: /Users/ryan/Downloads/sstephenson-
prototype-6a529ac/test/unit/tmp/prototype.temp.js.
Processing. 99%
rake aborted!
rake aborted!
wrong number of arguments (1 for 2)
/Users/ryan/.gem/ruby/1.8/gems/treetop-1.4.3/lib/treetop/runtime/
compiled_parser.rb:48:in `initialize'
/Users/ryan/.gem/ruby/1.8/gems/treetop-1.4.3/lib/treetop/runtime/
compiled_parser.rb:48:in `new'
/Users/ryan/.gem/ruby/1.8/gems/treetop-1.4.3/lib/treetop/runtime/
compiled_parser.rb:48:in `terminal_failures'
/Users/ryan/.gem/ruby/1.8/gems/treetop-1.4.3/lib/treetop/runtime/
compiled_parser.rb:48:in `map!'
/Users/ryan/.gem/ruby/1.8/gems/treetop-1.4.3/lib/treetop/runtime/
compiled_parser.rb:48:in `terminal_failures'
/Users/ryan/Downloads/sstephenson-prototype-6a529ac/vendor/pdoc/lib/
pdoc/parser.rb:81:in `failures'
/Users/ryan/Downloads/sstephenson-prototype-6a529ac/vendor/pdoc/lib/
pdoc/parser.rb:103:in `expected_string'
/Users/ryan/Downloads/sstephenson-prototype-6a529ac/vendor/pdoc/lib/
pdoc/parser.rb:65:in `message'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2078:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Ryan Johnson

unread,
Mar 23, 2010, 8:11:30 PM3/23/10
to PDoc
Still trying to get a successful build, but made some progress today.
There is a known bug in the treetop gem. In treetop / runtime /
compiled_parser.rb, change the terminal failures method to this:

def terminal_failures
if @terminal_failures.empty? || @terminal_failures[0].is_a?
(TerminalParseFailure)
@terminal_failures
else
@terminal_failures.map! {|tf_ary| puts tf_ary.inspect;
TerminalParseFailure.new(*tf_ary) }
end
end

The "wrong number of arguments (1 for 2)" problem stems from the fact
that even though terminal_failures is a getter, it mutates the
@terminal_failures array, which can't be done twice. Unfortunately
this leads to another error. Would love some help in getting this up
and running. Would love to use PDoc, but losing hope since I can't get
it working with Prototype out of the box, but alas, I know Tobie is
quite busy.

(in /Developer/Projects/sstephenson-prototype-6a529ac)


Ryan-Johnsons-MacBook-Pro:sstephenson-prototype-6a529ac ryan$ rake doc
--trace

(in /Developer/Projects/sstephenson-prototype-6a529ac)


** Invoke doc (first_time)
** Invoke doc:build (first_time)
** Invoke doc:require (first_time)
** Execute doc:require
** Execute doc:build

mkdir -p /Developer/Projects/sstephenson-prototype-6a529ac/test/unit/
tmp
rm -rf /Developer/Projects/sstephenson-prototype-6a529ac/doc

Parsing source files: /Developer/Projects/sstephenson-
prototype-6a529ac/test/unit/tmp/prototype.temp.js.
Processing 99%
rake aborted!
[156683, " "]
[156683, "/**"]
[156683, "any character"]

ParseError: Expected one of " ", "/**" or "any character" at line
5811, column 1 (byte 156684) after "\n/* Prototype .........


5809 });
5810 })();
--> 5811
5812
5813

/Developer/Projects/sstephenson-prototype-6a529ac/vendor/pdoc/lib/pdoc/
parser.rb:26:in `parse'
/Developer/Projects/sstephenson-prototype-6a529ac/vendor/pdoc/lib/pdoc/
runner.rb:29:in `parse'
/Developer/Projects/sstephenson-prototype-6a529ac/vendor/pdoc/lib/pdoc/
runner.rb:42:in `run'
/Developer/Projects/sstephenson-prototype-6a529ac/vendor/pdoc/lib/
pdoc.rb:21:in `run'
/Developer/Projects/sstephenson-prototype-6a529ac/Rakefile:75:in
`build_doc_for'
/Developer/Projects/sstephenson-prototype-6a529ac/Rakefile:163
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'


/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Tobie Langel

unread,
Mar 28, 2010, 9:39:20 AM3/28/10
to PDoc
This is really strange.

We're using PDoc to build the Prototype doc without any issues.

Are you sure your're repo and submodules are up to date?

Best,

Tobie

Tobie Langel

unread,
Mar 31, 2010, 7:36:36 PM3/31/10
to PDoc, ryan
Turns out this might be an issue with the version of treetop you are using.

Try treetop 1.2.6.

Let me know how it goes,

Tobie

Ryan Johnson

unread,
Mar 31, 2010, 8:01:03 PM3/31/10
to Tobie Langel, PDoc
Installed treetop 1.2.6, removed the 1.4.x version I was using and
pulled a fresh copy of the trunk of git, but still failed:

Ryan-Johnsons-MacBook-Pro:Projects ryan$ git clone
git://github.com/sstephenson/prototype.git
Initialized empty Git repository in /Developer/Projects/prototype/.git/
remote: Counting objects: 5780, done.
remote: Compressing objects: 100% (2197/2197), done.
remote: Total 5780 (delta 4190), reused 4875 (delta 3513)
Receiving objects: 100% (5780/5780), 1.13 MiB | 621 KiB/s, done.
Resolving deltas: 100% (4190/4190), done.
Ryan-Johnsons-MacBook-Pro:Projects ryan$ cd prototype/
Ryan-Johnsons-MacBook-Pro:prototype ryan$ rake doc
(in /Developer/Projects/prototype)

You seem to be missing PDoc. Obtaining it via git...

Submodule 'vendor/caja_builder'
(git://github.com/tobie/unittest_js_caja_builder.git) registered for
path 'vendor/caja_builder'
Submodule 'vendor/nwmatcher/repository'
(git://github.com/dperini/nwmatcher.git) registered for path
'vendor/nwmatcher/repository'
Submodule 'vendor/pdoc' (git://github.com/tobie/pdoc.git) registered
for path 'vendor/pdoc'
Submodule 'vendor/sizzle/repository'
(git://github.com/jeresig/sizzle.git) registered for path
'vendor/sizzle/repository'
Submodule 'vendor/sprockets'
(git://github.com/sstephenson/sprockets.git) registered for path
'vendor/sprockets'
Submodule 'vendor/unittest_js'
(git://github.com/tobie/unittest_js.git) registered for path
'vendor/unittest_js'
Initialized empty Git repository in
/Developer/Projects/prototype/vendor/pdoc/.git/
remote: Counting objects: 1594, done.
remote: Compressing objects: 100% (764/764), done.
remote: Total 1594 (delta 888), reused 1371 (delta 739)
Receiving objects: 100% (1594/1594), 395.28 KiB | 368 KiB/s, done.
Resolving deltas: 100% (888/888), done.
Submodule path 'vendor/pdoc': checked out
'472a55dd0019acf034d4f72522915a5e9efd0a1a'
mkdir -p /Developer/Projects/prototype/test/unit/tmp
rm -rf /Developer/Projects/prototype/doc
Pygments version 1.2.2, (c) 2006-2008 by Georg Brandl.
Using syntax highlighter: pygments

Parsing source files:
/Developer/Projects/prototype/test/unit/tmp/prototype.temp.js.
Processing.. 100%
rake aborted!

ParseError: Expected one of " ", "/**" or "any character" at line

5943, column 1 (byte 160654) after "\n/* Prototype .....
..........
5941 });
5942 })();
--> 5943
5944
5945

/Developer/Projects/prototype/vendor/pdoc/lib/pdoc/parser.rb:26:in `parse'
/Developer/Projects/prototype/vendor/pdoc/lib/pdoc/runner.rb:29:in `parse'
/Developer/Projects/prototype/vendor/pdoc/lib/pdoc/runner.rb:42:in `run'
/Developer/Projects/prototype/vendor/pdoc/lib/pdoc.rb:21:in `run'
/Developer/Projects/prototype/Rakefile:82:in `build_doc_for'
/Developer/Projects/prototype/Rakefile:213


/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in


`synchronize'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in


`synchronize'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/ryan/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

Ryan-Johnsons-MacBook-Pro:prototype ryan$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.2.2, 2.1.0, 1.3.6)
actionpack (2.2.2, 2.1.0, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.2.2, 2.1.0, 1.15.6)
activeresource (2.2.2, 2.1.0)
activesupport (2.2.2, 2.1.0, 1.4.4)
acts_as_ferret (0.4.3)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
libxml-ruby (1.1.2)
maruku (0.6.0)
mini_exiftool (1.0.1)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
open4 (1.0.1)
polyglot (0.3.0)
rails (2.2.2, 2.1.0, 1.2.6)
rake (0.8.7, 0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
sprockets (1.0.2)
sqlite3-ruby (1.2.4)
syntax (1.0.0)
termios (0.9.4)
treetop (1.2.6)
xmpp4r (0.4)

Ryan Johnson

unread,
Mar 31, 2010, 8:01:29 PM3/31/10
to Tobie Langel, PDoc
Running snow leopard. Thanks for following up.

Ryan Johnson

unread,
May 20, 2010, 3:15:11 PM5/20/10
to PDoc
I had given up on running PDoc under 10.6, but got it running on a
linux VM with no problems. After reinstalling xcode for another
project I accidentally ran pdoc from my mac, and it worked just fine.
So if anyone else is having similar problems try reinstalling xcode
and see if that helps. I'm officially a PDoc convert:

http://activejs.org/

--
You received this message because you are subscribed to the Google Groups "PDoc" group.
To post to this group, send email to pd...@googlegroups.com.
To unsubscribe from this group, send email to pdoc+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pdoc?hl=en.

Andrew Dupont

unread,
May 20, 2010, 3:17:04 PM5/20/10
to pd...@googlegroups.com
Ryan,

I was thrilled to see that ActiveJS had switched over.

What problems were you having when trying to run PDoc? Maybe we can prevent other users from encountering the same pitfalls.

Cheers,
Andrew
Reply all
Reply to author
Forward
0 new messages