Conversation
Source Maps v4 standard proposal is an addendum to source maps to improve post-hoc debugging and analysis of call stacks. This proposal is being put forward in [https://github.com/MicrosoftEdge/MSEdgeExplainers/pull/538](Microsoft Edge) and is designed to enable an analysis of stack traces to reconstruct an unminified stack trace. To do so, two additional fields are added to the source maps output: - `scopeNames` - `scopes` The latter field behaves similarly to the existing `mappings` field. The former list are names that should be displayed for a given function once it is determined to be responsible. The format of the `scopes` field is a Base64 VLQ with 6 fields, which are, in order: - Source file index - Source line (relative offset) - Source character (relative offset) - End line (relative offset, should always be positive) - End character (relative offset) - Index into `scopeNames` (This first commit does not implement the VLQ encoding; rather, all number values are directly passed in and are neither relative nor are they encoded as VLQs).
- Method declarations - Constructor - Class property accessors - Improved arrow scope - Arrow scope call expressions - Lambda class property - Base64 VLQ encoding of `scopes` property Fixed a bug that allowed some code to execute in v3 passes.
Several tests related to tsc --init / tsc watch were breaking as a result of the new option. These tests have been rebaselined or adjusted as needed to accommodate the new `sourceMapVersion` setting.
|
I'm confused about this. I modified some of the tests to output the diff, and I see a diff, but I don't see a difference in the diff. ===================================================================
--- Expected The current baseline
+++ Actual The new version
@@ -1,12 +1,12 @@
-Input::
-//// [/user/username/projects/myproject/file1.ts]
-export const c = 30;
-
-//// [/user/username/projects/myproject/src/file2.ts]
-import {c} from "file1"; export const d = 30;
-
-//// [/a/lib/lib.d.ts]
+Input::
+//// [/user/username/projects/myproject/file1.ts]
+export const c = 30;
+
+//// [/user/username/projects/myproject/src/file2.ts]
+import {c} from "file1"; export const d = 30;
+
+//// [/a/lib/lib.d.ts]
/// <reference no-default-lib="true"/>
interface Boolean {}
interface Function {}
interface CallableFunction {}
@@ -15,11 +15,11 @@
interface Number { toExponential: any; }
interface Object {}
interface RegExp {}
interface String { charAt: any; }
-interface Array<T> { length: number; [n: number]: T; }
-
-//// [/user/username/projects/myproject/tsconfig.json]
+interface Array<T> { length: number; [n: number]: T; }
+
+//// [/user/username/projects/myproject/tsconfig.json]
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
@@ -120,14 +120,14 @@
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
-
-
-
-/a/lib/tsc.js -w -p /user/username/projects/myproject/tsconfig.json
-Output::
->> Screen clear
+
+
+
+/a/lib/tsc.js -w -p /user/username/projects/myproject/tsconfig.json
+Output::
+>> Screen clear |
|
Does not agree with the proposed spec on the encoding of |
|
We can't review or merge speculative features, so I'm going to close this PR. If source maps v4 makes it through the standards process, please restart this PR. |
Source Maps v4 standard proposal is an addendum to source maps to
improve post-hoc debugging and analysis of call stacks. This proposal is
being put forward in MicrosoftEdge/MSEdgeExplainers#538
and is designed to enable an analysis of stack traces to reconstruct an
unminified stack trace.
To do so, two additional fields are added to the source maps output:
scopeNamesscopesThe latter field behaves similarly to the existing
mappingsfield. Theformer list are names that should be displayed for a given function once
it is determined to be responsible. The format of the
scopesfield isa Base64 VLQ with 6 fields, which are, in order:
scopeNamesFixes #46695