Success! Looks like we've fixed this one. According to our records the fix was applied for SDKTOOLS-369 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2010
    Posts
    25
    Vote Rating
    1
    steenole is on a distinguished road

      0  

    Default Why is compilation dependent on themes

    Why is compilation dependent on themes


    Why is it necessary to have a "packages" folder in my application stucture, containing 3 themes folders (base, classic and neutral) in order to compile my javascript? If I remove these folders, the build fails with

    Code:
    Sencha Cmd v3.1.0.216
    [INF] Scanning for extensions in C:\devapps\SenchaSDK30\bin\Sencha\Cmd\3.1.0.216\extensions
    [INF] Loaded extension sencha-compass
    [INF] Loaded extension sencha-io
    [WRN] Failed to resolve package ext-theme-classic
    [ERR] Theme ext-theme-classic not found
    [ERR] com.sencha.exceptions.ExNotFound: Required packages not found
    Since I have a lot of small applications, I would like to generate my css once and for all, and not having to do the theme generation in every single application.

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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


    There are ways to use a theme that bypass the build process, but that does prevent some potentially helpful optimizations. The primary advantage is that new app/theme build process produces the only CSS you need for your app. This would be most helpful for small apps that don't use all of the framework since many component's styling would be removed in this case.

    To forego that and use the "ext-all.css" file, you need to turn off the theme by commenting out the "app.theme" in .sencha/app/sencha.cfg, but that is currently a bug (now linked to this thread).

    As a workaround, you can add these to .sencha/app/sencha.cfg (at the end probably):

    Code:
    skip.sass=1
    skip.slice=1
    skip.theme=1
    Then remove the SASS fragment of the core build from .sencha/app/build-xml line 430 or so (the "page" target). That fragment looks like this:

    Code:
                # sass
                    
                    and
                    restore
                        page
                    and
                    #only set variables for used classes eg. $include-class-name
                    sass
                        +class-name-vars
                        -variable=$image-search-path:'${image.search.path}'
                        -variable=$theme-name: '${app.theme}' !default
                        -output=${app.out.scss}
                    and
                    include
                        -all
                    and
                    sass
                        +class-name-vars
                        +etc
                        +vars
                        +rules
                        -variable=$image-search-path:'${image.search.path}'
                        -variable=$theme-name: '${app.theme}' !default
                        -output=${app.example.scss}
                    and
                    # include etc and vars from all classes
                    sass
                        +etc
                        +vars
                        +append
                        -output=${app.out.scss}
                    and
                    restore
                        page
                    and
                    #only include rules from used classes
                    sass
                        +rules
                        +append
                        -output=${app.out.scss}
                    and
                    sass
                        +ruby
                        -output=${app.out.ruby}
    Just delete that part for now. The fix for this bug will make all of that unnecessary and simply clearing app.theme will be sufficient.
    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 - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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


    Thanks for the report! I have opened a bug in our bug tracker.

  4. #4
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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


    With all of the above disabled, you will need to be sure to include the proper CSS links of course and possibly the overrides from the desired theme (Neptune does contain JavaScript overrides).

    I suspect this is all pretty familiar to you, but just wanted to avoid confusion for others.
    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!"

  5. #5
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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 fix was just merged for 3.1 GA so please let me know if the above workarounds did not resolve the issue for you.

    In 3.1 GA, simply not setting app.theme will disable the theme build step.
    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!"

  6. #6
    Ext JS Premium Member
    Join Date
    Jan 2010
    Posts
    25
    Vote Rating
    1
    steenole is on a distinguished road

      0  

    Default


    The workarounds you mentioned works for me.

    Thanks

  7. #7
    Sencha User farion's Avatar
    Join Date
    Feb 2008
    Location
    Karlsruhe, Germany
    Posts
    75
    Vote Rating
    10
    farion will become famous soon enough

      0  

    Default


    Issue still exists:

    Code:
    Sencha Cmd v3.1.0.256
    [INF] 
    ...
    [WRN] Failed to resolve package ext-theme-classic
    [ERR] Theme ext-theme-classic not found
    [ERR] 
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Required packages not found
    [ERR] 
    [ERR] Total time: 3 seconds
    [ERR] com.sencha.exceptions.ExNotFound: Required packages not found

  8. #8
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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 ext-theme-classic package must be missing there... The package must exist (in your "packages" folder of the app/workspace) but you don't necessarily have to build the Sass.
    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!"

  9. #9
    Sencha User farion's Avatar
    Join Date
    Feb 2008
    Location
    Karlsruhe, Germany
    Posts
    75
    Vote Rating
    10
    farion will become famous soon enough

      0  

    Default


    Where should I get this package? I just tried with a fresh ExtJS 4.2 App.

    Code:
    sencha generate workspace foo
    
    sencha -sdk path/to/extjs generate app FooApp bar
    EDIT:

    I copied some packages after generation of the workspace

    Code:
    cp path/to/extjs/packages/ext-theme-base packages/ -r
    cp path/to/extjs/packages/ext-theme-neutral packages/ -r
    cp path/to/extjs/packages/ext-theme-classic packages/ -r
    Now it works. But is this correct. This packages are ExtJS Packages and not related to a Sencha Touch App, that I want to place there also?

  10. #10
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    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


    Looks like the Ext JS app is being generated outside the workspace. The app should exist in the workspace because that is where the framework and packages references go.

    Code:
    sencha generate workspace foo
    
    cd foo
    
    sencha -sdk path/to/extjs generate app FooApp bar
    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!"