Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17631 closed defect (fixed)

Generated source map links to wrong row

Reported by: dellekappa Owned by:
Priority: blocker Milestone: 1.9.3
Component: BuildSystem Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

Creating a custom build with java and closure optimizations generates a wrong mapping for source map. The mapping maps to uncompressed code on the wrong row (the previous one). To be clearer, the issue seems to be caused by the generated comments at the beginning of js files, such as the copyright and

//>>built

In closure.js and in optimizeRunner.js the last new line character is not taken into account so maybe a "/n" must be added at the end of string passed to sourceMap.setWrapperPrefix

Attachments (2)

closure.patch (762 bytes) - added by dellekappa 6 years ago.
optimizeRunner.patch (566 bytes) - added by dellekappa 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by dellekappa

Attachment: closure.patch added

Changed 6 years ago by dellekappa

Attachment: optimizeRunner.patch added

comment:1 Changed 6 years ago by ben hockey

so maybe a "/n" must be added at the end of string passed to sourceMap.setWrapperPrefix

are you saying this patch fixes it or is it just your best guess? i.e. before i spend any time trying this myself, have you tried this and seen it working?

comment:2 in reply to:  1 Changed 6 years ago by dellekappa

Replying to neonstalwart:

so maybe a "/n" must be added at the end of string passed to sourceMap.setWrapperPrefix

are you saying this patch fixes it or is it just your best guess? i.e. before i spend any time trying this myself, have you tried this and seen it working?

This works for me, but I'm not an expert of dojo build system, so I'm not sure this would not break something else, but it seems quite unlikely

comment:3 Changed 6 years ago by ben hockey

dellekappa, this is a trivial change and i'm going to change the patch a little bit but have you submitted a CLA for dojo?

comment:4 Changed 6 years ago by ben hockey

i've opened a PR that should fix this... https://github.com/dojo/util/pull/14

comment:5 Changed 6 years ago by Colin Snover

Milestone: tbd1.9.3
Priority: undecidedblocker
Resolution: fixed
Status: newclosed

Hooks are a little slow today apparently.

Fixed in 92d40ea7dd095e3e5a24c0ce929cbcaf6a961618 for master Fixed in 48dc74ef3c61967d3f73d82c4810f19ca9b50565 for 1.9

comment:6 in reply to:  3 Changed 6 years ago by dellekappa

Replying to neonstalwart:

dellekappa, this is a trivial change and i'm going to change the patch a little bit but have you submitted a CLA for dojo?

This sounds new to me, anyway I'll do it as sono as possible

Note: See TracTickets for help on using tickets.