Build system fails silently for hidden trailing comma error.

Description

Dojo 1.9 release, closure compiler. When building an application, the target .js file is not created minified when there is this error, found only when you redirect the build's error output to a file thusly:

The two trailing comma "errors" are not reported as errors in the build report file, nor in the command window error/warnings summary.

All the other files are built, but the target file (app.js) has just two lines (the two leading forward slashes for each line are not displayed below):

>>built
@ sourceMappingURL=app.js.map

The uncompressed version that is created is correct and has the proper content.

The build-report.txt file showed this summary:

Process finished normally

errors: 0
warnings: 53
build time: 151.695 seconds

When removing the two trailing commas in 1) a new Button({...}) property list and 2) a domStyle(...) array, the correct target file (app.js) was "built" with proper content.

Although this was marked an error, it bubbled up as nothing or possibly a warning, yet the target file was not created properly.

It's good to catch these type errors early on, so it seems they should remain errors (although maybe tolerated by most browsers), but should bubble up in the build-report.txt file as an error, identifying the error(s) in the build-report.txt file with the same level of detail. [Side note: seems like other syntax errors that are in the report file do not provide enough info to resolve the problem, so resorting to the 1>std.txt 2>err.txt is the only way to investigate and resolve the problem. Is that the intent? If so, perhaps it should be documented?]

Side note: For something slightly more convenient, you can copy and interleave STDERR text into STDOUT by going:

command >log.txt 2>&1

Note that the order matters, and the 2>&1 needs to be after you've told it which file to write to, and that in some multi-threaded cases the two streams might constantly interrupt each other and lead to a mishmash of output.

There might be a nodejs vs rhino thing going on here. My project is based on the third-party dojo-boilerplate template (which IIRC is recommended by some dojo tutorials) and the problem occurs when I do not have nodejs installed so it falls back on rhino (java.)

The following is an excerpt from dojo-boilerplate's build.sh script, just for context:

While this issue is very annoying, it does appear to be a Rhino only issue and not an issue with Node. As such, we're going to move to the 1.11 release as we don't yet have a patch to fix this for non-Node users.

Rawld has started working on this. Unfortunately this is going to need to wait until 1.12 as we're out of time and the patched version of Closure compiler proposed above is having other issues in our tests unfortunately.