ICEfaces
  1. ICEfaces
  2. ICE-9790

Replace YUI Compressor and ShrinkSafe JS minifiers with Google's Closure Compiler

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      java

      Description

      Try to replace YUI Compressor and ShrinkSafe JS minifiers with Google's Closure Compiler ( https://developers.google.com/closure/compiler/ ). This will allows us to use only one minification tool across all sub-projects.

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        Fix Version/s 4.0 [ 10770 ]
        Mircea Toma made changes -
        Affects Version/s 4.0 [ 10770 ]
        Hide
        Mircea Toma added a comment -

        Replaces ShrinkSafe and YUICompressor minifiers with ClosureCompiler. Also modified build files to use this new tool.

        Show
        Mircea Toma added a comment - Replaces ShrinkSafe and YUICompressor minifiers with ClosureCompiler. Also modified build files to use this new tool.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39716 Mon Jan 20 16:31:30 MST 2014 mircea.toma ICE-9790 Replace ShrinkSafe minifier with ClosureCompiler.
        Files Changed
        Commit graph ADD /icepush/trunk/icepush/lib/js-compiler.jar
        Commit graph MODIFY /icepush/trunk/icepush/core/build.javascript.xml
        Commit graph DEL /icepush/trunk/icepush/lib/shrinksafe.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39717 Mon Jan 20 16:35:02 MST 2014 mircea.toma ICE-9790 Replace ShrinkSafe anf YUICompressor minifiers with ClosureCompiler.
        Files Changed
        Commit graph DEL /icefaces4/trunk/icefaces/lib/shrinksafe.jar
        Commit graph ADD /icefaces4/trunk/icefaces/lib/js-compiler.jar
        Commit graph DEL /icefaces4/trunk/icefaces/lib/yui-compressor.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39720 Mon Jan 20 17:36:02 MST 2014 mircea.toma ICE-9790 Replace ShrinkSafe anf YUICompressor minifiers with ClosureCompiler.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/build.javascript.xml
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/build.xml
        Hide
        Carmen Cristurean added a comment - - edited

        Re-opening because of these two issues:

        1)Building icefaces with IF4 trunk rev# 39720 using "ant allclean world", the following errors are seen during the build, however the final build is successful.
        I am using Java 1.6.0_24 and ant 1.7.1.

        ..........
        res-js-compress:
        [echo] Compressing ace-yui.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1
        [echo] Compressing ace-jquery.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1
        [echo] Compressing ace-datatable.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1
        [echo] Compressing ace-menu.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1
        [echo] Compressing ace-components.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1
        [echo] Compressing ace-chart.js
        [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major.
        inor version 51.0
        [java] at java.lang.ClassLoader.defineClass1(Native Method)
        [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        [java] at java.security.AccessController.doPrivileged(Native Method)
        [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit.
        [java] Exception in thread "main"
        [java] Java Result: 1

        res-js-no-compress:

        res-css-combine:

        res-copy:
        [copy] Copying 1 file to C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\build\exploded\META-INF
        [copy] Copying 951 files to C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\build\exploded\META-INF\resource
        ..................

        2) On Icefaces4 trunk rev# 39959, there are browser console errors when loading showcase (or other QA test apps) in any browser.

        Firefox26:
        "NetworkError: 404 Not Found - http://localhost:8080/showcase/RES_NOT_FOUND"
        RES_NOT_FOUND
        TypeError: ice.push is undefined
        [Break On This Error]

        ice.push.deregister([_114]);
        coales...=bnzo5q (line 2908)

        Chrome32:
        GET http://localhost:8080/showcase/RES_NOT_FOUND 404 (Not Found) showcase.jsf:5
        Uncaught TypeError: Cannot call method 'deregister' of undefined coalesced.js.jsf?ln=ice.core&dgst=bnzo5q:2907

        Show
        Carmen Cristurean added a comment - - edited Re-opening because of these two issues: 1)Building icefaces with IF4 trunk rev# 39720 using "ant allclean world", the following errors are seen during the build, however the final build is successful. I am using Java 1.6.0_24 and ant 1.7.1. .......... res-js-compress: [echo] Compressing ace-yui.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 [echo] Compressing ace-jquery.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 [echo] Compressing ace-datatable.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 [echo] Compressing ace-menu.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 [echo] Compressing ace-components.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 [echo] Compressing ace-chart.js [java] java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner : Unsupported major. inor version 51.0 [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] Could not find the main class: com.google.javascript.jscomp.CommandLineRunner. Program will exit. [java] Exception in thread "main" [java] Java Result: 1 res-js-no-compress: res-css-combine: res-copy: [copy] Copying 1 file to C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\build\exploded\META-INF [copy] Copying 951 files to C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\build\exploded\META-INF\resource .................. 2) On Icefaces4 trunk rev# 39959, there are browser console errors when loading showcase (or other QA test apps) in any browser. Firefox26: "NetworkError: 404 Not Found - http://localhost:8080/showcase/RES_NOT_FOUND " RES_NOT_FOUND TypeError: ice.push is undefined [Break On This Error] ice.push.deregister( [_114] ); coales...=bnzo5q (line 2908) Chrome32: GET http://localhost:8080/showcase/RES_NOT_FOUND 404 (Not Found) showcase.jsf:5 Uncaught TypeError: Cannot call method 'deregister' of undefined coalesced.js.jsf?ln=ice.core&dgst=bnzo5q:2907
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Replaced js-compiler.jar with a version that can run on JVM 1.6.

        Show
        Mircea Toma added a comment - Replaced js-compiler.jar with a version that can run on JVM 1.6.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39729 Tue Jan 21 13:13:58 MST 2014 mircea.toma ICE-9790 Replace js-compiler.jar with a version that can run on JVM 1.6.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/lib/js-compiler.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39730 Tue Jan 21 13:15:27 MST 2014 mircea.toma ICE-9790 Replace js-compiler.jar with a version that can run on JVM 1.6.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/lib/js-compiler.jar
        Commit graph DEL /icepush/trunk/icepush/lib/js.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39732 Tue Jan 21 14:14:58 MST 2014 mircea.toma ICE-9790 Redirected the JS minification warnings to build/js-compiler.log file.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/build.xml
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Hide
        Mircea Toma added a comment -

        See if it is possible to show the JS minifying errors in the console.

        Show
        Mircea Toma added a comment - See if it is possible to show the JS minifying errors in the console.
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Mircea Toma made changes -
        Comment [ Redirected the JS minification warnings (for ACE components) to build/js-compiler.log file. ]
        Hide
        Mircea Toma added a comment -

        Modified build files to filter out WARNINGs in the console logging while JS minifying.

        Show
        Mircea Toma added a comment - Modified build files to filter out WARNINGs in the console logging while JS minifying.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39735 Tue Jan 21 15:49:37 MST 2014 mircea.toma ICE-9790 Filter out WARNINGs in the console logging.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/build.javascript.xml
        Commit graph MODIFY /icepush/trunk/icepush/core/build.javascript.xml
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/build.xml
        Hide
        Carmen Cristurean added a comment -

        Re-opening because:
        1) GMap component is suspected to have been affected:

        Testing showcase > GMap with projectStage=Production found the following errors that cannot be reproduced when using projectStage=Development (Firefox26, Chrome32, IF4 trunk rev# 39735, 39742):

        > Google Events/ Map Markers:
        ReferenceError: wrapper is not defined
        http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=n9wjqd/eval/seq/89
        Line 1

        > Overlays:
        ReferenceError: map is not defined
        http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=n9wjqd/eval/seq/70
        Line 1

        2) Warnings are still visible while building icefaces (Java 1.6/Ant 1.7.1).

        .....
        :4910: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
        [java] if ( elem.parentNode ) {
        [java] ^
        [java]
        [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js
        :4911: WARNING - Suspicious code. The result of the 'getprop' operator is not being used.
        [java] elem.parentNode.selectedIndex;
        [java] ^
        [java]
        [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js
        :9957: WARNING - Suspicious code. The result of the 'getprop' operator is not being used.
        [java] div.offsetHeight;
        [java] ^
        [java]
        [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js
        :19797: WARNING - Suspicious code. The result of the 'getprop' operator is not being used.
        [java] active.id;
        [java] ^
        ................

        Show
        Carmen Cristurean added a comment - Re-opening because: 1) GMap component is suspected to have been affected: Testing showcase > GMap with projectStage=Production found the following errors that cannot be reproduced when using projectStage=Development (Firefox26, Chrome32, IF4 trunk rev# 39735, 39742): > Google Events/ Map Markers: ReferenceError: wrapper is not defined http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=n9wjqd/eval/seq/89 Line 1 > Overlays: ReferenceError: map is not defined http://localhost:8080/showcase/javax.faces.resource/coalesced.js.jsf?ln=ice.core&dgst=n9wjqd/eval/seq/70 Line 1 2) Warnings are still visible while building icefaces (Java 1.6/Ant 1.7.1). ..... :4910: WARNING - Suspicious code. This code lacks side-effects. Is there a bug? [java] if ( elem.parentNode ) { [java] ^ [java] [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js :4911: WARNING - Suspicious code. The result of the 'getprop' operator is not being used. [java] elem.parentNode.selectedIndex; [java] ^ [java] [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js :9957: WARNING - Suspicious code. The result of the 'getprop' operator is not being used. [java] div.offsetHeight; [java] ^ [java] [java] C:\svn\ossrepo\icefaces4\trunk\icefaces\ace\component\resources\icefaces.ace\util\ace-jquery.uncompressed.js :19797: WARNING - Suspicious code. The result of the 'getprop' operator is not being used. [java] active.id; [java] ^ ................
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment - - edited

        1) The GMAp issue is caused by an evaluation of code that references a local variable. Since local variables are renamed by the compressor the evaluation fails.

        The fix changes slightly the code to avoid evaluating the local variables, instead evaluate only the passed in options which were meant to be evaluated.

        Show
        Mircea Toma added a comment - - edited 1) The GMAp issue is caused by an evaluation of code that references a local variable. Since local variables are renamed by the compressor the evaluation fails. The fix changes slightly the code to avoid evaluating the local variables, instead evaluate only the passed in options which were meant to be evaluated.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39844 Wed Jan 29 17:09:10 MST 2014 mircea.toma ICE-9790 Avoid to evaluate local variables, instead evaluate only the passed in options.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/gmap/gmap.js
        Hide
        Mircea Toma added a comment -

        2) I cannot reproduce the warnings shown during the build. I even ran the build with code that was freshly check-out, the results was the same.

        Show
        Mircea Toma added a comment - 2) I cannot reproduce the warnings shown during the build. I even ran the build with code that was freshly check-out, the results was the same.
        Hide
        Ken Fyten added a comment -

        Note that ICEfaces 4 should use Ant 1.8.4 as a minimum version.

        Show
        Ken Fyten added a comment - Note that ICEfaces 4 should use Ant 1.8.4 as a minimum version.
        Hide
        Carmen Cristurean added a comment -

        Confirming that no warnings occur if building Icefaces4 with Ant 1.8.4.

        Show
        Carmen Cristurean added a comment - Confirming that no warnings occur if building Icefaces4 with Ant 1.8.4.
        Hide
        Mircea Toma added a comment -

        Created issue ICE-9809 to make sure the warnings are fixed, not just ignored.

        Show
        Mircea Toma added a comment - Created issue ICE-9809 to make sure the warnings are fixed, not just ignored.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: