Description
Current approach on bootstrap stages adds too much complexity on the bootstrap codebase; the complexity continues to grow with the additional changes made on bootstrap and it's not even functioning correctly (like writing incorrect stages to stdout on certain commands).
One possible solution could be to handle stage behaviours as part of the Step
trait individually on Step
implementation.
Some references to why current implementation of step calculations is making things so difficult/complicated:
rust/src/bootstrap/src/core/build_steps/compile.rs
Lines 839 to 847 in ef32456
rust/src/bootstrap/src/core/build_steps/compile.rs
Lines 905 to 926 in ef32456
Particularly, the behaviors of the force_use_stage function are not really useful for all use cases (for instance, see #118233 and #118918)
Lines 1403 to 1417 in ef32456
@rustbot label +T-bootstrap