Causes observable changes with prepareStackTrace
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- 没有语言数据
- 星标
- 15
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tc39/proposal-error-capturestacktrace 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 40/100
tc39/proposal-error-capturestacktrace#15 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 35/100
tc39/proposal-error-capturestacktrace#13 · 4 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
tc39/proposal-error-capturestacktrace#2 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
tc39/proposal-error-capturestacktrace#1 · 4 条评论 ·
查看 tc39/proposal-error-capturestacktrace 的全部 Issue
相似的 Issue
-
change request evaluating
难度 2/5 1-3 小时 新手友好度 72/100
sindresorhus/eslint-plugin-unicorn#3907 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
SDK: add a StarboundClient.getNetworkInfo convenience method可能已有人在做 @Daniexie 今天认领。 未关闭good first issue sdk Stellar Wave
难度 2/5 1-3 小时 新手友好度 72/100
OlaGreat/starbound-realms#134 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
kellyjonbrazil/jc#788 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100