thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

Closure Compiler fails with 'maxBuffer exceeded' when more than one file is processed #51

Closed dprentis closed 10 years ago

dprentis commented 10 years ago

I'm using version 0.9.0 on a Windows x64 machine and I have the following config:

closureCompiler: {
  options: {
    compilerFile: 'utils/compiler.jar',
    compilerOpts: {
      compilation_level: 'SIMPLE_OPTIMIZATIONS',
      jscomp_off: ['checkTypes', 'fileoverviewTags'],
      summary_detail_level: 3,
      language_in: 'ECMASCRIPT5'
    },
    execOpts: {
      maxBuffer: 999999 * 1024
    }
  },
  chrome: {
    files: [
      {src: 'temp/chrome/background.js', dest: 'temp/compiled/chrome/background.js'},
      {src: 'temp/chrome/js/injection.js', dest: 'temp/compiled/chrome/js/injection.js'}
    ]
  }
}

The first file is processed correctly, but the second one fails with:

>>>Error: maxBuffer exceeded.
>>>Failed to run command for target: chrome

It doesn't matter what value I set maxBuffer to.

If I remove the first file from the config, the second file is processed correctly. Basically it seems to fail as soon as more than one file is to be processed.

thanpolas commented 10 years ago

That's @stforek's domain... Przemyslaw ideas?

stforek commented 10 years ago

Fixed here: https://github.com/thanpolas/task-closure-tools/pull/1

thanpolas commented 10 years ago

thanks @stforek!

Patch released, v0.9.2 has this issue fixed.