mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user