Skip to content

fix(debuginfo): Limit Function's Debug - #1051

Open
loewenheim wants to merge 2 commits into
masterfrom
sebastian/function-debug-depth-limit
Open

fix(debuginfo): Limit Function's Debug#1051
loewenheim wants to merge 2 commits into
masterfrom
sebastian/function-debug-depth-limit

Conversation

@loewenheim

Copy link
Copy Markdown
Contributor

The Debug impl of Function is naturally recursive because the type is. Instead of rewriting the impl to be iterative I decided to simply institute a depth limit of 16. This means that after 16 levels of inlinees the inlinees field is displayed as [..]. I believe that should be plenty for all practical cases.

ref: INGEST-1133

The `Debug` impl of `Function` is naturally recursive because the type
is. Instead of rewriting the impl to be iterative I decided to simply
institute a depth limit of 16. This means that after 16 levels of
inlinees the `inlinees` field is displayed as `[..]`. I believe that
should be plenty for all practical cases.
@loewenheim
loewenheim requested a review from a team as a code owner August 20, 2026 12:16
@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown

INGEST-1133

@jjbayer jjbayer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A test case with insta::assert_debug_snapshot would be nice here.

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.

2 participants