fix cycles in extern modules

This commit is contained in:
nora 2023-11-05 16:48:13 +01:00
parent 3af8f4fc40
commit a699262671
2 changed files with 23 additions and 3 deletions

View file

@ -22,6 +22,8 @@ export type CrateLoader = (
export class GlobalContext {
public error: ErrorHandler = new ErrorHandler();
public finalizedCrates: Crate<Final>[] = [];
// For cycle detection.
public cratesBeingLoaded: Set<string> = new Set<string>();
public crateId: Ids = new Ids();
constructor(public opts: Options, public crateLoader: CrateLoader) {}