Add island packages to the judged set without a union spread

The self-hosted compiler refuses spreading 'number[] | Set<string>' into
a string[] literal (SC1090), so pnpm build:native-compiler failed on
loadFrontend. The judged set now starts from the library packages and
adds each island package in a loop.
This commit is contained in:
Chris Tate
2026-10-25 06:40:14 -05:00
parent f3750ef976
commit 928aad993d
+3 -1
View File
@@ -545,7 +545,9 @@ function loadFrontend(
// The shared preflight/lowering refusal and dependency-closure checks remain.
// Node island packages are judged already: they stay out of the
// program, typed by their declarations (scope-B NI-4).
const judged = new Set<string>([...libraryNpmStatic, ...(options.islandPackages ?? [])]);
const judged = new Set<string>(libraryNpmStatic);
if (options.islandPackages !== undefined)
for (const name of options.islandPackages) judged.add(name);
let requested: string[] = [];
let reusableScout: ReturnType<typeof loadProgram> | null = null;
let reusablePreflight: ScrDiagnostic[] | null = null;