On Feb 6, 4:41 am,
denis.riabtc...@gmail.com wrote:
> I'm not sure that I understand all the concerns.
>
> Indeed, the current configuration of jGrouseDoc, where all
> configuration properties are in XML file, is far from perfection and
> there are plans to address it by moving all them into
> separate .properties file. That should address the problem of
> complexity.
> You cannot get away from some kind of config file anyway, regardless
> if you're using ANT-based tool or anything else.
I guess I disagree. Why should a new user have to deal with a config
file if jgd has reasonable default settings (i.e. the default stuff
that's already in build.xml), and they can provide the files as
command line arguments?
Yes, a config file is useful when it comes to defining environment
customization, and for build scripts and the like. But at the end of
the day, ant config files are "power tools" that have a non-trivial
learning curve. For a new user that learning curve is a lot of
unnecessary work. :(
> I can hardly see how installation of ANT could be a problem - it is a
> simple download/unzip. Nothing compared to installation of Perl with
> required packages on Windows workstation (sure, not an issue for Linux/
> Apple guys :-))
True... but having to install secondary packages to get something
running is never the best user experience. Especially if there's any
possibility that the installation might go wrong (e.g. by installing
the wrong version). Even more so if the error messages you get as a
result are less than clear about the problem. (Which I think is the
case with jgd and the ant version).
> Nothing prevents you from running ANT from your dev directory. You
> just need either to have run ant from your dev directory and pass the
> name of build file. If build.xml is in your dev directory, then you
> can simply run ANT without parameters.
Hmm... I guess I just haven't figured out the magic incantation for
this. It doesn't help that our build file is using relative paths.
> Once the configuration properties are moved out from build.xml to a
> separate file, there would be no need to update them manually every
> time a new version is released, unless you would want to use new
> configuration options offered by new release.
Yup, and I look forward to this change. :)
> I also not quite understand the problem with rapid iteration
> development and how it is related to usage of ANT.
> If you want to troubleshoot problems with specific javascript file,
> you can simply modify <jgdoc ...><fileset dir="${inputDir}"
> includes="**/*.js"> line in build.xml to include only the file (or
> files) that you need.
That's _exactly_ the problem! I just want to test one file, not a
whole directory of files. And while I'm sure there's an obvious-after-
the-fact way to do that, I don't know what it is. 'Do I use <fileset
file="foo.js">? ... or <fileset dir="..." includes="foo.js">? ... or
something else?' I *know* the answer will be something reasonably
obvious, but as an ant-newbie, I don't know what it is. I have to
track down the ant documentation online, then sift through it to
figure out what tag/properties I should be using, and then find/edit
the config file.
Which is just silly.
> ANT is very powerful tool when it comes to specifications which files
> should be processed or excluded from processing. If I was to build a
> standalone command-line tool, I would have to re-implement a good deal
> of functionality that is offered by it for tracking file dependencies,
> selections of files to process, xslt task, etc.
> Hey, for standalone tool I can see someone requesting "process files
> in directories project1/, framework/ and mystuff/ but exclude any
> files with names starting with test" - go figure what is the best
> syntax for putting these conditions in a homegrown config file :-)
>
> Am I missing something big time? I am willing to help, just want to
> understand the problem.
I know ant makes your job (our job?), as the developer, much easier.
But exposing all the gory innards of ant to users is not a good idea.
It is does not result in a good user experience.
A simple invocation of "jgd *.js" or "jgd */*.js" would allow 95+% of
users to do exactly what they need, without ever having to muck around
in the configuration file. And while I agree a config file is
necessary for the more esoteric options and behaviors, I don't think
it's something those 95% of users should have to deal with.
And that goes double for new users.
If nothing else, it seems like there should be a simple bash script
that wraps the ant call, and that allows you to specify files on the
command line.
> BTW, just curious, what are you guys using for your build process?
Our main app is built using capistrano, but for the jgd docs, we use
custom bash script that runs hourly in a cron job.