Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Raw `sencha compile` failing to include framework

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    370

    Default Raw `sencha compile` failing to include framework

    My minimal build tests from ExtJS 5 are failing with ExtJS 6.0.0 and CMD 6.0.0.92. I couldn't find any new CMD 6 documentation and I don't get any errors about the compile parameters so I'm assuming for now that the syntax is the same as 5.0

    Check out this repo, there are branches for various test scenarios (compile.sh needs to be edited with your local ext-6.0.0 path):
    https://github.com/themightychris/ex...mal-build-test

    minimal branch - build succeeds, but output contains only the input class, no framework
    only-xtemplate branch - build fails, Ext.XTemplate not found
    only-ajax branch - build fails, Ext.Ajax not found
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  2. #2
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    The issue here is that we need to know the "toolkit" (classic or modern). I haven't looked into how to get that information into the compiler for direct use like this but I will ask about it.
    Don Griffin

    "Use the source, Luke!"

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    40

    Default

    Any progress?

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    40

    Default

    Use:

    sencha config \ -prop \ build.id=classic \ -prop \ build.name=classic \then \compile ...

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    370

    Default

    I want to compile some code that runs on the frontend of sites (jquery style) and I'd like to skip including any toolkit.

    This reference for CMD 6 seems to indicate this usage is still supported but the docs don't appear to have been updated: http://docs.sencha.com/cmd/6.x/advan...reference.html

    It says that setting the -sdk flag is all you need to do to get the compiler to pick up framework class sources

    I've updated my test cases and checked with the final ExtJS 6 and CMD 6 releases and all builds are still failing

    I didn't have any luck with chanand`s suggestion but would love a pull request on my compile.sh in one of the branches if anyone else can get it working

    Check out https://github.com/themightychris/ex...mal-build-test

    Current Results w/ ext-6.0.0.640-gpl + cmd-6.0.0.202
    • only-singleton: Compile succeeds but output only contains the singleton test class, no framework
    • only-xtemplate: Compile fails due to Ext.XTemplate not being found, despite -sdk switch being set
    • only-ajax: Compile fails due to Ext.Ajax not being found, despite -sdk switch being set


    All of these should be able to build without a toolkit and produce a build with the framework base + actual class dependencies suitable for standalone inclusion into a page. This produced extremely bloated builds under 5.x but worked
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  6. #6

    Default

    Quote Originally Posted by chanand View Post
    Use:

    sencha config \ -prop \ build.id=classic \ -prop \ build.name=classic \then \compile ...
    Can I buy a vowel please? I can't find a syntax that sencha will accept for this.

    * * *
    Rich Waters wrote a comment on this at https://www.sencha.com/blog/blazingl...-sencha-touch/ last August.

    If you can find him, he may have solved it...

    I think bloated is a way of life now. Witness the blog post.

    * * *

    Here I am within an extJS 6 workspace.

    The original sdk used to create the workspace is ../../../../../sencha/ext-6.0.0/


    Code:
    sencha \
    	-sdk ./ext/classic/classic/src \
        compile \
            -classpath=./chris \
            -options=debug:false \
            union -r -c MyApp.MyClass \
            and concat ./build/minimal.js \
            and concat -yui ./build/minimal.min.js \
            and meta -f -out ./build/minimal.filenames.js
    
    
    [ERR] Unable to locate supported Framework
    
    
    
    
    sencha \
    	-sdk ../../../../../sencha/ext-6.0.0/ \
        compile \
            -classpath=./chris \
            -options=debug:false \
            union -r -c MyApp.MyClass \
            and concat ./build/minimal.js \
            and concat -yui ./build/minimal.min.js \
            and meta -f -out ./build/minimal.filenames.js
    		
    NO ERRS but minimal contains only MyApp.
    		
    
    
    sencha \
    	-sdk ../../../../../sencha/ext-6.0.0/ \
        compile \
            -classpath=./chris,./ext/classic/classic/src \
            -options=debug:false \
            union -r -c MyApp.MyClass \
            and concat ./build/minimal.js \
            and concat -yui ./build/minimal.min.js \
            and meta -f -out ./build/minimal.filenames.js
    
    
    [ERR] Failed to resolve dependency Ext.Widget for file Ext.ProgressBarWidget
    * * *

    It may be possible to do this with Ant. Or at least that would work around my ignorance of how to set those properties AND compile in the same line.


    Sorry I cannot help. I post in ignorance because ya never know

  7. #7
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    370

    Default

    the \s indicate escapes for line breaks in a multi-line bash command, I think i'm applying the configs correctly here: https://github.com/themightychris/ex...ops/compile.sh

    Code:
    sencha \
    	-sdk $EXT_SDK_DIR \
        config \
            -prop build.id=classic \
            -prop build.name=classic \
        then compile \
            -classpath=./src \
            -options=debug:false \
            union -r -c MyApp.MyClass \
            and concat ./build/minimal.js \
            and concat -yui ./build/minimal.min.js \
            and meta -f -out ./build/minimal.filenames.js
    but I still get:

    Code:
    Sencha Cmd v6.0.0.202
    [INF] Configuration property changed. Reloading build environment state.
    [ERR] C2008: Requirement had no matching files (Ext.XTemplate) -- /Users/chris/Repositories/extjs-minimal-build-test/src/MyClass.js:3:10
    [ERR] Failed to find any files for /Users/chris/Repositories/extjs-minimal-build-test/src/MyClass.js::ClassRequire::Ext.XTemplate
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  8. #8
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    370

    Default

    Manually populating the classpath param with the src/overrides folder from needed framework packages gets the build to complete successfully with a reasonable looking file list:

    Code:
    sencha \
    	-sdk $EXT_SDK_DIR \
        compile \
            -classpath=./src,$EXT_SDK_DIR/packages/core/src,$EXT_SDK_DIR/packages/core/overrides \
            -options=debug:false \
            union -r -c MyApp.MyClass \
            and concat ./build/minimal.js \
            and concat -yui ./build/minimal.min.js \
            and meta -f -out ./build/minimal.filenames.js
    Code:
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/.sencha/package/Boot.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/Ext.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Error.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Number.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Array.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/String.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Date.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/util/Format.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/Template.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/util/XTemplateParser.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/util/XTemplateCompiler.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/XTemplate.js);
    bootstrap.loadScripts(../src/MyClass.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Object.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/util/Version.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/env/Browser.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/env/OS.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/env/Feature.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Assert.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/lang/Function.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/Util.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Inventory.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Config.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Configurator.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Base.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/util/Cache.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Class.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/ClassManager.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/env/Ready.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/class/Loader.js);
    bootstrap.loadScripts(../../../../../sdk/ext-6.0.0.640-gpl/packages/core/src/dom/Helper.js);
    But when I try to load the resulting build I get an error that Ext.define is undefined. Shouldn't that be in core/src/Ext.js?
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  9. #9

    Default

    Try adding ./ext/packages/core/src/class to the path?

    I'm not able to test here and now.

  10. #10
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    370

    Default

    ./ext/packages/core/src is already in my classpaths and stuff from the class/ folder is already being included in the build by CMD (looks like everything but Mixin is already getting included)


    It doesn't look like Ext.define is defined anywhere in the core/src/class files, does anyone know where Ext.define gets...defined?

    UPDATE: looks like it is defined in Ext.ClassManager which is getting included in my build already but maybe too late
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

Page 1 of 2 12 LastLast

Similar Threads

  1. [OPEN] Sencha Touch 2.3: sencha app build failing
    By jameslm in forum Sencha Touch 2.x: Bugs
    Replies: 9
    Last Post: 16 Nov 2014, 3:36 AM
  2. Replies: 2
    Last Post: 26 May 2014, 3:33 AM
  3. Compile exclude/include
    By prem1er in forum Sencha Cmd
    Replies: 3
    Last Post: 3 Jan 2014, 12:04 PM
  4. sencha compile resources exclude framework
    By sablebees in forum Sencha Cmd
    Replies: 1
    Last Post: 2 Dec 2013, 4:12 PM
  5. sencha compile and include -r option
    By mberrie in forum Sencha Cmd
    Replies: 9
    Last Post: 30 Sep 2012, 12:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •