Skip to content

feat(lib)!: remove creationStack#219

Draft
gabegorelick wants to merge 1 commit into
open-constructs:mainfrom
gabegorelick:remove-creation-stacks
Draft

feat(lib)!: remove creationStack#219
gabegorelick wants to merge 1 commit into
open-constructs:mainfrom
gabegorelick:remove-creation-stacks

Conversation

@gabegorelick
Copy link
Copy Markdown
Contributor

@gabegorelick gabegorelick commented May 28, 2026

AWS CDK removed them in aws/aws-cdk#37642 with the justification that they're slow and not used often enough to justify the cost. I think the same reasoning applies to cdktn.

Fixes #209
See #215

Related issue

Fixes #209

Description

Don't capture stack traces at all.

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

AWS CDK removed them in aws/aws-cdk#37642 with
the justification that they're slow and not used often enough to justify
the cost. I think the same reasoning applies to cdktn.

Fixes open-constructs#209
See open-constructs#215
* Creates a throwable Error object that contains the token creation stack trace.
* @param message Error message
*/
protected newError(message: string): any {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in #215 (comment), this function is only used by Intrinsic.newError, which we are deleting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cdktn: excessive cost of captureStackTrace

1 participant