Skip to content

Commit

Permalink
Unrolled build for rust-lang#124668
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#124668 - 12101111:fix-bootstrap-tarball, r=onur-ozkan

Fix bootstrap panic when build from tarball

Got this error when build from beta tarball (2024-05-03)

regression of rust-lang@6f4f39a

panic info:

```
thread 'main' panicked at src/core/builder.rs:583:25:
`should_run.paths` should correspond to real on-disk paths - use `alias` if there is no relevant path: src/llvm-project/compiler-rt/lib/crt
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: bootstrap::core::builder::ShouldRun::paths::{{closure}}
             at ./src/bootstrap/src/core/builder.rs:583:25
   3: core::iter::adapters::map::map_fold::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/adapters/map.rs:89:28
   4: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/iter/macros.rs:232:27
   5: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/adapters/map.rs:129:9
   6: core::iter::traits::iterator::Iterator::for_each
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:817:9
   7: alloc::vec::Vec<T,A>::extend_trusted
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/mod.rs:3020:17
   8: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_extend.rs:26:9
   9: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_from_iter_nested.rs:62:9
  10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_from_iter.rs:33:9
  11: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/mod.rs:2894:9
  12: core::iter::traits::iterator::Iterator::collect
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:2003:9
  13: <alloc::collections::btree::set::BTreeSet<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/collections/btree/set.rs:1191:34
  14: core::iter::traits::iterator::Iterator::collect
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:2003:9
  15: bootstrap::core::builder::ShouldRun::paths
             at ./src/bootstrap/src/core/builder.rs:578:13
  16: bootstrap::core::builder::ShouldRun::path
             at ./src/bootstrap/src/core/builder.rs:562:9
  17: <bootstrap::core::build_steps::llvm::CrtBeginEnd as bootstrap::core::builder::Step>::should_run
             at ./src/bootstrap/src/core/build_steps/llvm.rs:1174:9
  18: bootstrap::core::builder::StepDescription::run::{{closure}}
             at ./src/bootstrap/src/core/builder.rs:416:25
  19: core::iter::adapters::map::map_fold::{{closure}}
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/adapters/map.rs:89:28
  20: <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/slice/iter/macros.rs:232:27
  21: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/adapters/map.rs:129:9
  22: core::iter::traits::iterator::Iterator::for_each
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:817:9
  23: alloc::vec::Vec<T,A>::extend_trusted
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/mod.rs:3020:17
  24: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_extend.rs:26:9
  25: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_from_iter_nested.rs:62:9
  26: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/spec_from_iter.rs:33:9
  27: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/alloc/src/vec/mod.rs:2894:9
  28: core::iter::traits::iterator::Iterator::collect
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/iter/traits/iterator.rs:2003:9
  29: bootstrap::core::builder::StepDescription::run
             at ./src/bootstrap/src/core/builder.rs:414:27
  30: bootstrap::core::builder::Builder::run_step_descriptions
             at ./src/bootstrap/src/core/builder.rs:1047:9
  31: bootstrap::core::builder::Builder::execute_cli
             at ./src/bootstrap/src/core/builder.rs:1028:9
  32: bootstrap::Build::build
             at ./src/bootstrap/src/lib.rs:683:17
  33: bootstrap::main
             at ./src/bootstrap/src/bin/main.rs:79:5
  34: core::ops::function::FnOnce::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
```
  • Loading branch information
rust-timer committed May 5, 2024
2 parents 06e88c3 + f13edeb commit eb5f896
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2221,13 +2221,8 @@ impl<'a> Builder<'a> {
out
}

/// Return paths of all submodules managed by git.
/// If the current checkout is not managed by git, returns an empty slice.
/// Return paths of all submodules.
pub fn get_all_submodules(&self) -> &[String] {
if !self.rust_info().is_managed_git_subrepository() {
return &[];
}

static SUBMODULES_PATHS: OnceLock<Vec<String>> = OnceLock::new();

let init_submodules_paths = |src: &PathBuf| {
Expand Down

0 comments on commit eb5f896

Please sign in to comment.