View Full Version : Issue compiling with

30 Oct 2012, 4:06 PM

Per another thread, I'm attempting to compile a single source file making use of ExtJS 4. I'm running the following command:

sencha compile -classpath=app/assets/javascripts/admin,public/extjs/src union -r -file admin.js concat -out yo.js

And seeing the following output:

Sencha Cmd v3.0.0.230
[INFO ] Processing classPath entry : /home/nirvdrum/dev/workspaces/mogotest/sencha-compile-temp-dir
[INFO ] Processing classPath entry : app/assets/javascripts/admin
[INFO ] Processing classPath entry : public/extjs/src
[INFO ] Processing class inheritance graph
[INFO ] Processing instantiation refereces to classes and aliases
[INFO ] Processing source dependencies
[ERROR] Expected 0 parameters

Running with the debug flag, I see the following stacktrace:

com.sencha.exceptions.ExArg: Expected 0 parameters
at com.sencha.cli.Arguments.pullParameters(Arguments.java:179)
at com.sencha.cli.Command.dispatch(Command.java:41)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
at com.sencha.command.Sencha.main(Sencha.java:58)

My guess is I'm not finding the file name on the classpath and thus the concat command is being passed no files. So, there probably is a user error, but there shouldn't be an exception. Having said that, I'm not sure how to track down the user error since the file seems to be processed. Is there a way to print out the current set?

30 Oct 2012, 10:48 PM
The command should be:

sencha compile -classpath=app/assets/javascripts/admin,public/extjs/src union -r -file admin.js and concat -out yo.js

The reason is that the "and" is a command separator between the union and concat sub-commands of the compile command.

Hopefully that clarifies things. You can read more about command chaining here:


Without the "and" the next argument ("concat") appears to be a parameter to "union" which expects no parameters.

31 Oct 2012, 4:27 AM
Thanks for clarifying. I thought "and" was only used to link two disjoint productions or for modifying the set in the grammar. Inserting the "and" there fixed the issue for me.

I'm sure it's on your radar, but better error messaging here would be great. E.g., "Expected 0 arguments: found 'concat yo.js'." Or something along those lines.

12 Nov 2012, 1:44 AM

When working with chained commands 'Expected 0 parameters' is really just marginally better than 'An error occurred' ;)