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

🐛 Error stack trace line numbers are incorrect #21106

Closed
rivy opened this issue Nov 7, 2023 · 2 comments
Closed

🐛 Error stack trace line numbers are incorrect #21106

rivy opened this issue Nov 7, 2023 · 2 comments
Labels
bug Something isn't working correctly

Comments

@rivy
Copy link
Contributor

rivy commented Nov 7, 2023

I've run into stack traces with incorrect line numbers for certain source file constructions involving code blocks.

Here's a minimal example...

// t-error.ts
import { assert as _ } from 'https://deno.land/std@0.205.0/testing/asserts.ts';
{
	throw new Error('fail');
}
deno run --quiet t-error.ts
error: Uncaught Error: fail
Warning Couldn't format source line: Column 11 is out of bounds (source may have changed at runtime)
    at file:///mnt/c/.../t-error.ts:3:11

The incorrect line numbers occur under POSIX and WinOS.

In bisecting the problem; it looks like the regression started back in Deno v1.23.0 (and continues up to my current version, Deno v1.37.2).

Related to #20643 and/or #20993?

@rivy rivy changed the title Error stack trace line numbers are incorrect 🐛 Error stack trace line numbers are incorrect Nov 7, 2023
@rivy rivy changed the title 🐛 Error stack trace line numbers are incorrect 🐛 Error stack trace line numbers are incorrect Nov 7, 2023
@rivy rivy changed the title 🐛 Error stack trace line numbers are incorrect 🐛Error stack trace line numbers are incorrect Nov 7, 2023
@rivy rivy changed the title 🐛Error stack trace line numbers are incorrect 🐛 Error stack trace line numbers are incorrect Nov 7, 2023
@lucacasonato
Copy link
Member

This was already fixed in last release (1.38.0) - denoland/deno_ast#182

@lucacasonato lucacasonato added the bug Something isn't working correctly label Nov 7, 2023
@rivy
Copy link
Contributor Author

rivy commented Nov 23, 2023

@lucacasonato , thanks for the (prior) fix and response.

rivy added a commit to rivy/deno.dxx that referenced this issue Nov 23, 2023
- ref: [🐛 Error stack trace line numbers are incorrect](denoland/deno#21106)
rivy added a commit to rivy/deno.dxx that referenced this issue Nov 24, 2023
- ref: [🐛 Error stack trace line numbers are incorrect](denoland/deno#21106)
rivy added a commit to rivy/deno.dxx that referenced this issue Nov 24, 2023
- ref: [🐛 Error stack trace line numbers are incorrect](denoland/deno#21106)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants