git.haldean.org ubik / 7fdfaad
yeah that's not good. Haldean Brown 5 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
424424 {
425425 check_job = (struct ubik_compile_job *)
426426 cenv->to_compile.elems[i];
427
428 /* TODO: this is not sufficient! if this happens, we need to
429 * pull this one to the top of the stack; if module A depends
430 * on modules B and C, after loading A's AST you have:
431 * [bottom] A B C [top]
432 * If, in the process of loading C's AST, we discover it
433 * depends on B, it is not sufficient to leave the stack as-is,
434 * because it will lead to us attempting to compile C before B,
435 * which will raise an error. It means we need to bring B back
436 * up to the top, to make the stack:
437 * [bottom] A C B [top]
438 */
427439 if (strcmp(check_job->request->source_name, src) == 0)
428440 return OK;
429441 }