Skip to content

Convert Bootstrapper from Recursive to Iterative #1068

@rd4398

Description

@rd4398

The Bootstrapper class in src/fromager/bootstrapper.py currently uses recursive calls to process dependency trees. @dhellmann discovered that when bootstrapping packages with very deep or wide dependency graphs (especially with --multiple-versions mode enabled), this hits Python's recursion depth limit and causes stack overflow errors.

The recursion occurs at two critical points:

Line 521: Install dependencies (processed AFTER building the package)
Line 708: Build dependencies (BUILD_SYSTEM, BUILD_BACKEND, BUILD_SDIST - processed BEFORE building)

We should convert Bootstrapper to iterative approach

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions