#15789 closed defect (fixed)
build sometimes aborts on code with "debugger" statement (error building runner.js)
Reported by: | bill | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | BuildSystem | Version: | 1.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
When running:
./build.sh action=release profile=standard optimize=comments.keepLines releaseDir=/workspace/release-comments copyTests=true
I get the error:
error(356) The optimizer threw an exception; the module probably contains syntax errors. module identifier: /workspace/release-comments/dojo/util/doh/runner.js; exception: (compile time:0.01s). OPTIMIZER FAILED: JavaException: java.lang.RuntimeException: Token: 159
Not sure why java is running when I have node installed. Perhaps it's running shrinksafe because I specified optimize=comments.keepLines instead of optimize=comment.keepLines (see #15788).
Change History (8)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Summary: | error building runner.js → build sometimes aborts on code with "debugger" statement (error building runner.js) |
comment:4 Changed 9 years ago by
Milestone: | tbd → 1.9 |
---|---|
Status: | new → assigned |
comment:6 Changed 9 years ago by
shrinksafe-modified rhino is used by the builder to strip comments. Unfortunately, the shrinksafe version of rhino (at least) cannot decompile debugger statements. Since runner.js includes a debugger statement as part of its functionality, attempting to compile with optimize==comments or comment.keeplines results in the optimizer throwing an error.
I solved the problem by using a dojo pragma to strip the debugger statement when shrinksafe is being used as indicated above. For all practical purposes, there's really no reason to optimize runner.js...so I don't view it as too important that runner's feature was stripped.
Fwiw, I checked dojo, dijit, dojox, and demos and there are no other debugger statements except in some html files which don't get sent to the optimizer.
It's from the debugger; statement in the code, but that statement was added intentionally many years ago.