1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    24
    Vote Rating
    2
    nirvdrum is on a distinguished road

      0  

    Default Issue compiling with 3.0.0.230

    Issue compiling with 3.0.0.230


    Hi,

    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:

    Code:
    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:

    Code:
    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?

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,348
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    The command should be:

    Code:
    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:

    http://docs.sencha.com/ext-js/4-1/#!...mmand_advanced

    Without the "and" the next argument ("concat") appears to be a parameter to "union" which expects no parameters.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    24
    Vote Rating
    2
    nirvdrum is on a distinguished road

      1  

    Default


    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.

  4. #4
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    506
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      1  

    Default


    +1

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

Thread Participants: 2