-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Incorrect stack trace remaps #1559
Comments
Thanks good test case. I will look into it soon |
So with recent changes this is almost fixed, but not quite. We have the ability to apply source maps and colors to exceptions using the "FormatError" op. The Lines 268 to 269 in a21a5ad
However in the testing library we print So I think the fix should be to apply this patch in deno_std diff --git a/testing/mod.ts b/testing/mod.ts
index 06089a8..e8e00ca 100644
--- a/testing/mod.ts
+++ b/testing/mod.ts
@@ -265,7 +265,7 @@ export async function runTests() {
result = red_failed();
console.log("...", result);
console.groupEnd();
- console.error((e && e.stack) || e);
+ console.error(e);
failed++;
if (exitOnFail) {
break; When the following PR lands in core, we can close this issue: denoland/std#190 |
Explained here: denoland/deno#1559 (comment)
Explained here: denoland/deno#1559 (comment)
Explained here: denoland/deno#1559 (comment)
Explained here: denoland/deno#1559 (comment)
This is fixed now. |
Explained here: denoland#1559 (comment) Original: denoland/std@34ca603
It took me a while to narrow it down, but I had been noticing that stack traces a lot of the time were not remapping properly and I was able to narrow down a reproduction.
It requires at least two modules, where one of the modules has type annotations that are getting erased. So given:
a.ts
a_test.ts
I get the following failure and stack trace:
In particular it is saying the error occurred at
a.ts:2:22
which should bea.ts:7.29
.If
a.ts
doesn't have types, that are erased, then the mapping isn't wrong. If there is only a single module involved, even if that module exports something and contains erased types, then the mapping isn't wrong.The text was updated successfully, but these errors were encountered: