xquery / xquerydoc

xquerydoc - generate XQuery API documentation from your source code comments
https://github.com/xquery/xquerydoc
Other
38 stars 11 forks source link

calabash: Bad substitution #8

Closed ChristianGruen closed 12 years ago

ChristianGruen commented 12 years ago

I just installed xquerydoc (version from 14/01/12) on a Ubuntu machine; this is what I got after running the script:

user@user:~/Code/xquerydoc-0.1$ ./xquerydoc 
xquerydoc 0.1, generates xquery api documentation
Copyright (c) 2011, 2012 Jim Fuller, John Snelson
see https://github.com/xquery/xquerydoc

xquery dir: /home/user/Code/xquerydoc-0.1
output dir: /home/user/Code/xquerydoc-0.1/xqdoc
        format: html

generating documentation ...
/home/user/Code/xquerydoc-0.1/deps/xmlcalabash/calabash: 4: Bad substitution
xquerydoc processing is done.

The xqdoc/lib directory contains the following files:

user@user:~/Code/xquerydoc-0.1$ ls -l xqdoc/lib/
total 92
-rw-rw-r-- 1 user user 25253 2012-01-15 22:09 lang-xq.js
-rw-rw-r-- 1 user user  1065 2012-01-15 22:09 prettify.css
-rw-rw-r-- 1 user user 59286 2012-01-15 22:09 prettify.js

Hope this helps, Christian

xquery commented 12 years ago

at first glance this sounds like the parser borked, are you applying xquerydoc to pure xquery 1.0, xquery 3.0 (or MarkLogic 1.0-ml) ? Can you supply a representative example xquery you are trying to document ?

Note I will be adding the EBNF you contributed plus more graceful error handling of parser issues once I get a free moment (juggling 3 open source projects at the moment and trying to get them all 'usable' by XML Prague).

ChristianGruen commented 12 years ago

I must admit I haven't done anything else than installing xquerydoc and running the script from the installed directory. It may be that I'll have to add some xquery files first? I'll just try that, and run the script from within the directory containing the xquery files.

Thanks for adding the EBNF!

xquery commented 12 years ago

oh ya, you will need xquery scripts .... though thx for the report as we should handle this error gracefully

xquery commented 12 years ago

change xquerydoc script to use /bin/bash ... seems like our installer has other ideas of what should be there.

xquery commented 12 years ago

pls download new generic installer ... seems like izpack (our installer) replaces shell shebang with what it thinks your system needs, thus the /bin/sh versus /bin/bash.

hope that fixes things for you

ChristianGruen commented 12 years ago

..perfect; after replacing /bin/sh with /bin/bash in the calabash script, I managed to run the script, and created the documentation for a first example.

just a side note (which doesn't really fit to this GitHub issue..): once more, i've started the script in its own directory, but the process runs since 30 minutes and doesn't stop. It might be due to some symbolic links that are causing an endless loop?..

xquery commented 12 years ago

good news, and I updated installer to stop playing silly tricks like this

if you are running xquerydoc against xquerydoc own sources remember xquerydoc has all the parser definitions in xquery itself ... these are seriously 'big' files ..... as they are generated files these xquery scripts are much larger then anything you would actually encounter in reality. They are the biggest xquery files I have seen.

jpcs commented 12 years ago

I think this issue is fixed now.