Load platform dependencies

We were dropping packages from the platform header while loading.

Closes #6931
This commit is contained in:
Agus Zubiaga 2024-08-06 18:14:37 -03:00
parent 13f60cde09
commit 7027547182
No known key found for this signature in database
7 changed files with 166 additions and 1 deletions

View file

@ -4922,6 +4922,7 @@ fn build_platform_header<'a>(
.zip(requires.iter().copied()),
arena,
);
let packages = unspace(arena, header.packages.item.items);
let exposes = bumpalo::collections::Vec::from_iter_in(
unspace(arena, header.exposes.item.items).iter().copied(),
arena,
@ -4943,7 +4944,7 @@ fn build_platform_header<'a>(
filename,
is_root_module,
opt_shorthand,
packages: &[],
packages,
header_type,
module_comments: comments,
header_imports: Some(header.imports),