Skip to content

Commit

Permalink
Auto merge of #9793 - nipunn1313:install_parallel2, r=alexcrichton
Browse files Browse the repository at this point in the history
Determine packages to install prior to installing

Old logic (pseudocode)
```
for krate in to_install {
    pkg = determine_pkg(krate);
    install_pkg(pkg);
}
```
New logic
```
let pkgs = to_install.into_iter(|krate| determine_pkg(krate));
pkgs.into_iter(|pkg| install_pkg(pkg));
```

This has the short term benefit of dumping most error messages out earlier in the process (eg a typo in the second package name).

Longer term, it might help with #9741 - as only the second loop would be parallelized. First loop shouldn't be parallelized because it would lead to redundant registry/git updates.
  • Loading branch information
bors committed Aug 19, 2021
2 parents 259ea8c + f9c2d04 commit b64c96b
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 457 deletions.
Loading

0 comments on commit b64c96b

Please sign in to comment.