Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Provide source map for internal extension code #22716

Merged
merged 4 commits into from Mar 6, 2024

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Mar 5, 2024

This commit adds support for source maps for ext/ crates that are authored
in TypeScript. As a result any exceptions thrown from eg. ext/node will now
have correct stack traces.

This is only enabled in debug mode as it adds about 2Mb to the binary.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 2 MB is a lot though I think it should be a feature flag until we can get some infra to emit and use ext source maps from the file system.

@littledivy
Copy link
Member

littledivy commented Mar 6, 2024

Instead of a feature flag, let's make this cfg!(debug_assertions)

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bartlomieju bartlomieju merged commit 8b1f160 into denoland:main Mar 6, 2024
17 checks passed
@bartlomieju bartlomieju deleted the ext_source_maps branch March 6, 2024 13:18
littledivy pushed a commit that referenced this pull request Mar 8, 2024
This commit adds support for source maps for `ext/` crates that are
authored in TypeScript. As a result any exceptions thrown from eg. `ext/node`
will now have correct stack traces.

This is only enabled in debug mode as it adds about 2Mb to the binary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants