global: fixes

This commit is contained in:
nym21
2026-04-27 11:19:05 +02:00
parent e543e4a5db
commit b24bfdc15c
15 changed files with 116 additions and 111 deletions

View File

@@ -110,8 +110,9 @@ fn topological_sort_schemas(schemas: &TypeSchemas) -> Vec<String> {
for (name, schema) in schemas {
let mut type_deps = BTreeSet::new();
collect_schema_refs(schema, &mut type_deps);
// Only keep deps that are in our schemas
type_deps.retain(|d| schemas.contains_key(d));
// Only keep deps that are in our schemas, and drop self-references
// (handled at emit time by quoting via current_type)
type_deps.retain(|d| schemas.contains_key(d) && d != name);
deps.insert(name.clone(), type_deps);
}