Skip to content

Commit 17dc411

Browse files
committed
fix(shard): order every module required by a row closure
1 parent 17638b7 commit 17dc411

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/site_commands.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,6 +3278,7 @@ pub fn run_stack_shard_with_sources(
32783278
let by_key: BTreeMap<ModuleKey, &Candidate> =
32793279
universe.iter().map(|c| (ModuleKey::of(c), c)).collect();
32803280
let mut universe_starts = Vec::new();
3281+
let mut universe_missing = BTreeSet::new();
32813282
for (i, line) in lines.iter().enumerate() {
32823283
if universe_for[i] != Some(u) || opaque[i].is_some() {
32833284
continue;
@@ -3371,6 +3372,7 @@ pub fn run_stack_shard_with_sources(
33713372
}
33723373
}
33733374
}
3375+
universe_missing.extend(closure.to_build.iter().cloned());
33743376
universe_starts.push(start.clone());
33753377
closures[i] = Some(LineClosure {
33763378
root: module_name(start),
@@ -3380,7 +3382,9 @@ pub fn run_stack_shard_with_sources(
33803382
// One closure over every line of the universe gives a dependency
33813383
// order for the prelude.
33823384
orders.push(
3383-
closure_against_installed(&universe, &universe_starts, Choice::Newest, &is_installed)
3385+
closure_against_installed(&universe, &universe_starts, Choice::Newest, &|key| {
3386+
!universe_missing.contains(key) && is_installed(key)
3387+
})
33843388
.to_build
33853389
.iter()
33863390
.map(module_name)

0 commit comments

Comments
 (0)