Skip to content

Hunk diff in a repo with large untracked files gives "RangeError: Maximum call stack size exceeded" #218

@eldos-dl

Description

@eldos-dl

When doing hunk diff in a repo with large untracked files (~700k lines). Getting the following error.

  RangeError: Maximum call stack size exceeded.
      at maxFileCodeLineWidth (/$bunfs/root/hunk:87896:18)
      at <anonymous> (/$bunfs/root/hunk:92593:156)
      at reduce (native:1:11)
      at <anonymous> (/$bunfs/root/hunk:92593:96)
      at mountMemo (/$bunfs/root/hunk:4319:33)
      at useMemo (/$bunfs/root/hunk:9373:27)
      at App (/$bunfs/root/hunk:92593:57)
      at react-stack-bottom-frame (/$bunfs/root/hunk:10256:27)
      at renderWithHooks (/$bunfs/root/hunk:3629:40)
      at updateFunctionComponent (/$bunfs/root/hunk:5357:34)

Desired behavior: Hunk gracefully handles and shows "File too large" in preview for large files.
Also, similar to git diff, maybe better exclude untracked files by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions