Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#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 bill)

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 7 years ago by bill

Description: modified (diff)

It's from the debugger; statement in the code, but that statement was added intentionally many years ago.

comment:2 Changed 7 years ago by bill

Description: modified (diff)
Summary: error building runner.jsbuild sometimes aborts on code with "debugger" statement (error building runner.js)

comment:3 Changed 7 years ago by bill

#16420 is a duplicate of this ticket.

comment:4 Changed 6 years ago by Rawld Gill

Milestone: tbd1.9
Status: newassigned

comment:5 Changed 6 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [31229]:

strip debugger statement when submitting resource to shrinksafe rhino; fixes #15789; !strict

comment:6 Changed 6 years ago by Rawld Gill

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.

comment:7 Changed 6 years ago by Rawld Gill

In [31250]:

strip debugger statement when submitting resource to shrinksafe rhino; fixes #15789; !strict

comment:8 Changed 6 years ago by bill

This caused a regression with template inlining, see #17141.

Note: See TracTickets for help on using tickets.