Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closureCompiler task silently fails. #66

Closed
ArthurianX opened this issue Sep 4, 2014 · 5 comments
Closed

closureCompiler task silently fails. #66

ArthurianX opened this issue Sep 4, 2014 · 5 comments

Comments

@ArthurianX
Copy link

I have this task:

`closureCompiler: {

        options: {

            // [REQUIRED] Path to closure compiler
            compilerFile: 'compiler.jar',
            //checkModified: true,

            compilerOpts: {
                compilation_level: 'ADVANCED_OPTIMIZATIONS',
                formatting:'PRETTY_PRINT',
                language_in: 'ECMASCRIPT5_STRICT',
                angular_pass: null,
                create_source_map: null,
                externs: ['externs/angular.js', 'externs/underscore.js'],
                //define: ["'goog.DEBUG=false'"],
                warning_level: 'verbose',
                jscomp_off: ['checkTypes', 'fileoverviewTags', 'missingProperties'],
                summary_detail_level: 3
                //output_wrapper: '"(function(){%output%}).call(this);"'
            },
            execOpts: {
                /**
                 * Set maxBuffer if you got message "Error: maxBuffer exceeded."
                 * Node default: 200*1024
                 */
                maxBuffer: 999999 * 1024
            },
            TieredCompilation: true // will use 'java -server -XX:+TieredCompilation -jar compiler.jar'
        },
        // any name that describes your task
        processJS: {
            src: '<%= compile_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>-codebase-'+currTimeStamp+'.js',
            dest: '<%= compile_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>-codebase-'+currTimeStamp+'.js'
        }
    }`

I have ironed out all the errors I was getting and now when I run the task it still fails, like this:

`Executing: java -server -XX:+TieredCompilation -jar "compiler.jar" --js compile/assets/xxx-7.0.0-codebase-1409837668761.js --js_output_file=compile/assets/xxx-7.0.0-codebase-1409837668761.js --compilation_level ADVANCED_OPTIMIZATIONS --formatting PRETTY_PRINT --language_in ECMASCRIPT5_STRICT --angular_pass --create_source_map --externs externs/angular.js --externs externs/underscore.js --warning_level verbose --jscomp_off checkTypes --jscomp_off fileoverviewTags --jscomp_off missingProperties --summary_detail_level 3

Error: Command failed: 0 error(s), 0 warning(s)
FAILED to run command for target: processJS
Warning: Task "closureCompiler:processJS" failed. Use --force to continue.`

If I force it, everything is ok, but that is not the solution here.

What could I be doing wrong? Or what is the module doing wrong? :D

Thanks!

@thanpolas
Copy link
Owner

@ArthurianX can you please try to successfully execute the compiler command on command line without using the grunt task? Copy paste it to an editor, try to take it apart (remove parts) until it starts working...

Then we can figure out what's wrong...

@ArthurianX
Copy link
Author

Hey Thanasis,

I tried that. 

Directly in the shell I get a message as a response: '0 warnings, 0 errors'.

As a wild guess or going on a limb I'd say that grunt doesn't understand that message as a success, not certain. 

I have the latest closure.jar, I'll try hat you said and then update the issue here. 

thanks ! 

Sent from Mailbox

On Thu, Sep 4, 2014 at 6:21 PM, Thanasis Polychronakis
notifications@github.com wrote:

@ArthurianX can you please try to successfully execute the compiler command on command line without using the grunt task? Copy paste it to an editor, try to take it apart (remove parts) until it starts working...

Then we can figure out what's wrong...

Reply to this email directly or view it on GitHub:
#66 (comment)

@thanpolas
Copy link
Owner

@ArthurianX does this issue persist? Are there any more indications as to the source / cause?

@ArthurianX
Copy link
Author

Hello,

I fixed this issue long time ago, but I honestly don't remember what the
issue was, apparently the task was silently failing because of some errors
in the code, I solved them and it worked, I also added proper externs for
the libraries I was using, and it all ended up being ok.

Sorry for not stating the solution here, I was utterly swamped!

On 16 January 2015 at 13:16, Thanasis Polychronakis <
notifications@github.com> wrote:

@ArthurianX https://github.com/ArthurianX does this issue persist? Are
there any more indications as to the source / cause?


Reply to this email directly or view it on GitHub
#66 (comment)
.

Arthur Kovacs - Senior FrontEnd Developer
linkedin.com/in/arthurianx

Senior FrontEnd Developer
S.C. SHE Informationen Technologies S.R.L.
Cladirea mica TCI Invest
Str. Alexandru Vaida Voievod, nr. 2-3, parter.
Cluj Napoca
ROMANIA

Web: http://www.she.net/ http://www.pitechnologies.ro/
Mobile : +4(0721).55.66.00

Yahoo: m3s_4ev3r@yahoo.com
Skype: arthur.kovacs85

@thanpolas
Copy link
Owner

nice, thanks @ArthurianX :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants