[ 
https://issues.apache.org/jira/browse/GUACAMOLE-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15651593#comment-15651593
 ] 

Michael Jumper commented on GUACAMOLE-116:
------------------------------------------

>From what I recall, this was our original intent, but Google Closure Compiler 
>failed to compile the non-minified version of AngularJS due to the use of 
>reserved words for variable names:

{code:none}
...
Creating merged file [guacamole.js].
Creating minified file [guacamole.min.css].
Creating minified file [guacamole.min.js].
[guacamole.js:9630] missing ( before function parameters.
[guacamole.js:9630] missing } after function body
[guacamole.js:9632] syntax error
[guacamole.js:9635] missing ; before statement
[guacamole.js:9637] syntax error
[guacamole.js:9655] missing ; before statement
[guacamole.js:9656] syntax error
[guacamole.js:19809] identifier is a reserved word
[guacamole.js:25300] identifier is a reserved word
[guacamole.js:25300] illegal character
[guacamole.js:25300] syntax error
[guacamole.js:25301] syntax error
[guacamole.js:25302] syntax error
[guacamole.js:25303] syntax error
[guacamole.js:25304] syntax error
[guacamole.js:25305] syntax error
[guacamole.js:25306] syntax error
[guacamole.js:25307] syntax error
[guacamole.js:26622] identifier is a reserved word
[guacamole.js:26623] identifier is a reserved word
[guacamole.js:26625] identifier is a reserved word
[guacamole.js:26626] identifier is a reserved word
[guacamole.js:26627] identifier is a reserved word
[guacamole.js:26628] identifier is a reserved word
[guacamole.js:26645] identifier is a reserved word
[guacamole.js:26838] identifier is a reserved word
[guacamole.js:35580] identifier is a reserved word
[guacamole.js:35600] identifier is a reserved word
[guacamole.js:35613] invalid return
[guacamole.js:35626] syntax error
[guacamole.js:1] Compilation produced 30 syntax errors.
{code}

Apparently newer versions of the compiler do not suffer from this problem, as 
newer versions of ECMAScript do not reserve those words:

http://stackoverflow.com/questions/18539486/angularjs-failing-to-compile-with-google-closure-app-ant

With that in mind, I just tried upgrading the {{minify-maven-plugin}} to a 
newer version (1.7.5), and the build errors disappear, though additional 
JSDoc-related warnings appear which would need to be suppressed within the 
pom.xml, again due to AngularJS:

{code:xml}
<closureWarningLevels>
    <misplacedTypeAnnotation>OFF</misplacedTypeAnnotation>
    <nonStandardJsDocs>OFF</nonStandardJsDocs>
</closureWarningLevels>
{code}

While I am also curious what distribution requirements [~Natureshadow] is 
referring to, this is a problem even without such requirements. Source should 
not bundle pre-compiled artifacts. It's simply a problem we've been forced to 
accept due to the limitations of the build.

Now that those limitations seem to be gone, I would be very much in favor of 
fixing this.

> Please strip pre-built minified JavaScript libraries from source tarballl
> -------------------------------------------------------------------------
>
>                 Key: GUACAMOLE-116
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-116
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: guacamole-client
>    Affects Versions: 0.9.9
>            Reporter: Dominik George
>            Priority: Minor
>
> Please do not ship pre-built minified versions of JavaScript libraries, like 
> angularjs.min.js, with the source tarball.
> They should be recreated at build time, and having them in the source tarball 
> is an issue for distributions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to