Implement Error.captureStackTrace
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- compilers
Research direction
Start with the existing lazy Error stack data, Error.prototype.stack accessors, CallStack, and stack formatting implementation. Read the current TC39 proposal, then inspect related language and built-in documentation, the Goccia proposal inventory, and existing tests. Done means the focused project tests, pinned Test262/proposal coverage, formatting, and documentation checks pass without regressions.
Written by the indexing model from the issue text.
Description
Summary
Implement the Stage 2 TC39 proposal: https://github.com/tc39/proposal-error-capturestacktrace
Add captureStackTrace(target[, constructorOpt]) with arbitrary-object mutation, frame elision, descriptors, and proposal errors.
Why
This proposal fits GocciaScript's modern ECMAScript surface and the 0.13.0 proposal roadmap. It should extend the engine's existing architecture rather than arrive as a userland shim.
Current behavior
Lazy Error stack data and Error.prototype.stack accessors exist, but Error.captureStackTrace is absent.
Expected behavior
Add captureStackTrace(target[, constructorOpt]) with arbitrary-object mutation, frame elision, descriptors, and proposal errors.
Scope notes
Reuse CallStack and existing formatting; do not add prepareStackTrace or structured frames. Cover Error/non-Error targets, proxies, non-extensible objects, existing stack properties, missing cutoffs, realms, bound/native functions, docs, and tests. Additive API: no flag.
Related bytecode roadmap: #871 and #875. Update the relevant language/built-in documentation and Goccia proposal inventory. Use the proposal repository and its current specification at implementation time; add focused project tests and matching pinned Test262/proposal coverage without regressions.
Acceptance criteria
- Parser/API surface, descriptors, evaluation order, errors, and observable protocol behavior match the current proposal.
- Implementation uses the identified shared engine seam without a duplicate compatibility shim.
- Focused positive, negative, abrupt-completion, and edge-case tests cover the proposal.
- Relevant project suites, pinned Test262 cases, formatting, and documentation checks pass.
- Dominant language
- Pascal
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 45
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from frostney/GocciaScript
-
internal
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
frostney/GocciaScript#1187 · 1 comment ·
-
bug internal
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
frostney/GocciaScript#1129 ·
-
bug engine
Difficulty 4/5 3-5 days Newbie friendliness 55/100
frostney/GocciaScript#1184 ·
-
bug engine
Difficulty 5/5 Over a week Newbie friendliness 38/100
frostney/GocciaScript#1180 ·
-
bug engine
Difficulty 4/5 3-5 days Newbie friendliness 68/100
frostney/GocciaScript#1173 ·
All issues in frostney/GocciaScript
Similar issues
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
secondlife/sl-vscode-plugin#147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/phie#149 ·