You found a bug! We've classified it as SDKTOOLS-380 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Dec 2007
    Posts
    39
    Vote Rating
    0
    danderson is on a distinguished road

      0  

    Default CMD production build fails due to .SVN

    CMD production build fails due to .SVN


    My application will successfully build a test version, but apparently fails to build a production version due to some type of svn conflict.

    I can build a test version of my app using:
    Code:
    sencha app build testing
    but when I attempt to build a production version using:
    Code:
    sencha app build production
    the following error is thrown:
    Code:
    [ERR]           failed generating diff from .svn to e0a93a0bc2dfb48ee19323686d1dd406f5c096de
    [ERR]           Unable to read dictionary file '<PATH TO APPLICATION DIRECTORY>/archive/app.js/.svn': Is a directory
    
    [ERR]
    [ERR]           BUILD FAILED
    We are currently using Sencha Cmd v3.0.2.288, and in 'app.json', the following line is present:
    Code:
    "ignore": [".svn$"],

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    What SDK are you trying to compile? ExtJS? what version?

    Also, please try our latest GA:
    http://www.sencha.com/forum/showthread.php?259473

    Scott.

  3. #3
    Sencha - Ext JS Dev Team
    Join Date
    Jan 2012
    Posts
    35
    Vote Rating
    8
    kkrohe will become famous soon enough

      1  

    Default


    This is a bug in the delta patch generator. Currently, the ignores filter is not
    used to filter out which files are needing delta patches generated, and the issue
    here is that the .svn folders in the archive location are accidentally being picked
    up as file entries for previous versions of application files (app.js in this case).


    The final fix will go into the upcoming Sencha Cmd 3.1.1 release, but there is a
    patch that can be applied to existing versions to correct this issue by skipping
    directories in the archive location when scanning for previous versions.


    The following code will need to be added to the app-build.js file from the SenchaCmd
    installation:


    Code:
    if(archivedVersion.isDirectory()) {
    	return;
    }

    That code patch will need to be added to the following locations:


    For Sencha Cmd 3.0.2, add the above code at line 355 of file:
    <Cmd-Install-Dir>/Sencha/Cmd/<Cmd-Version>/plugins/touch/current/app-build.js


    For Sencha Cmd 3.1.0, add the above code at line 372 of files:
    <Cmd-Install-Dir>/Sencha/Cmd/<Cmd-Version>/plugins/touch/current/app-build.js
    and
    <Cmd-Install-Dir>/Sencha/Cmd/<Cmd-Version>/plugins/touch/2.1/app-build.js

  4. #4
    Sencha User
    Join Date
    Dec 2007
    Posts
    39
    Vote Rating
    0
    danderson is on a distinguished road

      0  

    Default Production build still failing

    Production build still failing


    @kkrohe

    After making the edit, I was able to build the testing version successfully, but the production version still failed (albeit with a different error).

    Code:
    [ERR]
    [ERR]           BUILD FAILED
    [ERR]           com.sencha.exceptions.BasicException: The following error occurred while executing this line:
    [ERR]           <PATH TO APPLICATION DIRECTORY>/.sencha/app/build-impl.xml:137: com.sencha.exceptions.ExScript: TypeError: Cannot find function isDirectory in object 8817a2ac306cd9faf2a7373ee4eb0cb26e3cc310. (x-app-build#359)
    here is the placement of the recommended edit to the file:
    Code:
                            archivedVersion = archivedVersion.name;
    
                            // 3/25/2013 fix added
                            // http://www.sencha.com/forum/showthread.php?259435-CMD-production-build-fails-due-to-.SVN
                            if(archivedVersion.isDirectory()) {
                                    return;
                            }
    
                            if (archivedVersion == version) {
                                return;
                            }
    
                            var deltaFile = joinPath(
                                destination,
                                'deltas',
                                cleanFile,
                                archivedVersion + '.json');
    @scottmartin

    I am trying to compile Sencha Touch v 2.1.1 using Sencha Cmd v3.0.2.288

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Looks like this has been corrected and will be in the 3.1.1 release.

    Scott.

  6. #6
    Sencha - Ext JS Dev Team
    Join Date
    Jan 2012
    Posts
    35
    Vote Rating
    8
    kkrohe will become famous soon enough

      1  

    Default


    Actually, the patch needs to go before the line that converts the archivedVersion variable into its name string representation:

    Code:
                        each(archivedVersions, function (archivedVersion) {
                            //<patch>
                            if(archivedVersion.isDirectory()) {
                                return;
                            }
                            //</patch>
    
                            archivedVersion = archivedVersion.name;
    
    
                            if (archivedVersion == version) {
                                return;
                            }
                            ...
    Initially, the archivedVersion reference will be a java.io.File instance from the directory scan. The patch uses the isDirectory method to ensure that the File instance does not reference a directory before converting the variable to the string representation of the version.

    The error you were getting was due to the post-conversion variable not having the isDirectory method.

  7. #7
    Sencha User
    Join Date
    Dec 2007
    Posts
    39
    Vote Rating
    0
    danderson is on a distinguished road

      0  

    Default


    @kkrohe solution did the trick!

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    12
    Vote Rating
    0
    tjcsencha is on a distinguished road

      0  

    Default


    I still see this issue with Cmd 3.1.1 and latest 4.2 Ext. The .svn files cause sencha package build to fail (And I assume sencha app build too)

    Any ideas? I guess I could attempt to use the work around described in this thread, but I was hoping to avoid that.

    Thanks.