Skip to content

avoid spreading readdirRecursive results to prevent call stack overflow - #10971

Open
falahat wants to merge 1 commit into
mainfrom
fix-local-build-callstack-overflow
Open

avoid spreading readdirRecursive results to prevent call stack overflow#10971
falahat wants to merge 1 commit into
mainfrom
fix-local-build-callstack-overflow

Conversation

@falahat

@falahat falahat commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

#10956

The use of lambdas caused a call stack overflow when we had a lot of files

Scenarios Tested

TODO: Need to test with a giant app to reproduce the issue and fix it.

Sample Commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the file collection logic in createLocalBuildTarArchive to use a for...of loop instead of spreading mapped array elements, which prevents potential call stack size exceeded errors on large directories. Additionally, a unit test has been added to verify that nested output directories are packaged iteratively. There are no review comments, so I have no further feedback to provide.

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.

3 participants