Causes observable changes with prepareStackTrace
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript
- Bereich
- tooling
Rechercherichtung
Start with the issue's Error.captureStackTrace and Error.prepareStackTrace example, then inspect the linked source-map-support implementation at source-map-support.js around line 397. Compare the observable ordering and evaluation-cost concerns described here; the work is complete when the proposal has a decided behavior and its compatibility implications are documented.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When requiring the stack properties value to be eagerly evaluated in captureStackTrace there is a problematic interaction with the existing accompanying prepareStackTrace. That one allows arbitrarily formatting of the stack trace attached to the error object. This makes it observable when the string content of the stack property is computed.
The proposal here would require eager evaluation of the stack formatting code at captureStackTrace time. Whereas the current implementation does it lazily.
Error.prepareStackTrace = (error, stack) => {console.log("2. prepare")};
let err = {};
Error.captureStackTrace(err);
console.log("1. capture");
err.stack;
Here we would essentially have to swap the order of effect 1 and 2.
I think this is not just a theoretical issue. Next to an observable change in behavior it would also make the prepareStackTrace API prohibitively expensive to use.
There is evidence of effectfull and expensive prepareStackTrace handlers, see e.g., source-map-support for node.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 15
- Forks
- 5
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus tc39/proposal-error-capturestacktrace
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 40/100
tc39/proposal-error-capturestacktrace#15 · 1 Reaktion ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
tc39/proposal-error-capturestacktrace#13 · 4 Kommentare · 1 Reaktion ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
tc39/proposal-error-capturestacktrace#2 · 2 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
tc39/proposal-error-capturestacktrace#1 · 4 Kommentare ·
Alle Issues in tc39/proposal-error-capturestacktrace
Ähnliche Issues
-
Add 'upm' tag on githubOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
cloudflare/cloudflared#1783 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
leecade/caniuse_local#12 ·
-
b:minor bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
software-mansion/argent#1698 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
objectionary/jeo-maven-plugin#1933 ·
Maintainer antworten meist innerhalb von 2 Tagen