ClojureScript

Send inline source map information for form evaluation

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

Send inline source map information for form evaluation

When evaluating forms from a repl it is nice to see and get errors referencing source information. To achieve that:

1. Send a sourceMappingURL with a data url using a base64 encoded source map
2. Include sourcesContent in the source map based on the form being evaluated
3. Use sourceURL to name the eval block as the generated file referenced in the source map.

The included patch (inline_source_map.patch) provides a working implementation, but some possible downsides:

1. In order to have proper line numbers, handle additional changes based on `wrap`, and present nicely formatted source from just a form, it`pprint`s to a string and reads the input again.
2. It names the generated and source files based on the System/currentTimeMillis.
3. Generating the source maps is not currently optional, and might be useless overhead for non-browser repl-environments.

Activity

Nelson Morris made changes -
Field Original Value New Value
Attachment inline_source_map2.patch [ 12436 ]
Nelson Morris made changes -
Attachment inline_source_map3.patch [ 12443 ]
Nelson Morris made changes -
Attachment inline_source_map4.patch [ 12444 ]
David Nolen made changes -
Priority Major [ 3 ] Minor [ 4 ]
Nelson Morris made changes -
Attachment inline_source_map2.patch [ 12436 ]
Nelson Morris made changes -
Attachment inline_source_map3.patch [ 12443 ]
Nelson Morris made changes -
Attachment inline_source_map4.patch [ 12444 ]
Nelson Morris made changes -
Attachment inline_source_map.patch [ 12434 ]
Nelson Morris made changes -
Attachment inline_source_map.patch [ 12490 ]
David Nolen made changes -
Priority Minor [ 4 ] Major [ 3 ]
Nelson Morris made changes -
Attachment inline_source_map.patch [ 12490 ]
Nelson Morris made changes -
Attachment inline_source_map.patch [ 12495 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: