Description
Currently in config parser flow there are multiple other tasks involved such as validating stage 0 binaries and LLVM tools and downloading the beta toolchain. These logics are currently coupled in a single function as can be seen here:
rust/src/bootstrap/src/core/config/config.rs
Lines 1429 to 1447 in 3314d5c
Doing this results in performing downloads, expecting valid stage 0 binaries and LLVM tools even in unit tests of bootstrap itself.
To avoid this issue, we pass some configurations from the test functions like this:
rust/src/bootstrap/src/core/config/tests.rs
Lines 18 to 19 in 3314d5c
However, this approach is not sustainable as it could be easily missed when adding new tests. If we simplify parser functions to only parse values and perform validations and downloads immediately after the configuration parsing, this could resolve all the issues and make this process much simpler.