1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    91
    Vote Rating
    1
    extjs@peacetech.com is on a distinguished road

      0  

    Default Is it possible to make compile task fail on certain javascript parsing warnings?

    Is it possible to make compile task fail on certain javascript parsing warnings?


    We would like to use closure compilation as a final step of validating our JS code. to avoid some trivial errors like extra coma in arrays/objects and some less trivial as well. Is it possible to tell sencha build to fail on certain closure warnings (by code?) also is it possible to provide options to closure compiler so we can control parsing to some extent? Same probably goes for Rhino or YUI

    Also Cmd seems to be very un-extensible inside. I wanted to solve it by plugging in my own log handler which will analyze errors/warnings but no way, the whole thing is developed around singletons and static fields, makes assumptions everywhere (even main config file is loaded from where sencha.jar is only) and not modular at all. Also it seems to be not very friendly to be executed not under system class loader. I was trying to create maven plugin out of it (real plugin with sencha.jar and dependencies in maven not one executing local cmd install) and had a hell of a time doing it. Got it working but it's dirty. It is important to be able to have it packaged as maven plugin because using exact version of the tool is crucial to being sure your bug fix release is not going to fail due to updated version of the build tool

    Another thing that my compressed version did not work. Dynamic loading in dev mode worked fine all files loading no warnings but compressed version still loaded few of classes dynamically because order of compression was not right. I resolved it by removing views:[] from controllers. But it does not give me much confedence in Cmd's dependency resolution but maybe I missed some rules, will re-read docs

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,018
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I do not believe it will. If you are doing some automation then you could get the output and look for any specified warnings.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    91
    Vote Rating
    1
    extjs@peacetech.com is on a distinguished road

      0  

    Default


    I tried to do it by plugging in my own ConsoleHandler so I can intercept and analyze all log messages but Cmd seems to be so monolithic and un-configurable piece of code that it does not lend itself to any extensions. Its logging also seems to be very unfriendly to be executed under class loaders other than system (maven environment)

    If someone in Cmd team is interested, I am willing to be a guinea pig to try few enhancements and maven plugin out of Cmd

Thread Participants: 1