Source map support for rewriting error

Open
#352 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, javascript
Domain
compilers

Research direction

The issue names no files, tests, or entry points, so begin by locating QuickJS's stack-trace generation and its handling of transpiled JavaScript comments. Define basic source-map support for the described comments and verify that errors report the original source location rather than the transpiled location.

Written by the indexing model from the issue text.

Description

In Den the user have an option to include a Typescript transpiler (https://github.com/swc-project/swc) and the file will get transpiled to Javascript and also have an option to include the source map as a comment so that stack traces can be correctly remapped, however currently QuickJS does not take account into this and will the location of the error is often shifted away due to transpilation. Would be nice to include a basic support for source map so we can correctly print the right stack trace location.

Maybe related to https://github.com/bellard/quickjs/issues/235

Dominant language
C
Stars
11.1k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bellard/quickjs

All issues in bellard/quickjs

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.