MCPcopy Create free account
hub / github.com/apache/fory / validate_kotlin_generation

Function validate_kotlin_generation

compiler/fory_compiler/cli.py:307–322  ·  view source on GitHub ↗

Preflight Kotlin package and helper paths before writing output.

(
    files: List[Path],
    import_paths: List[Path],
    grpc: bool = False,
)

Source from the content-addressed store, hash-verified

305
306
307def validate_kotlin_generation(
308 files: List[Path],
309 import_paths: List[Path],
310 grpc: bool = False,
311) -> bool:
312 """Preflight Kotlin package and helper paths before writing output."""
313 cache: Dict[Path, Schema] = {}
314 graph: List[Tuple[Path, Schema]] = []
315 for file_path in files:
316 file_graph = collect_schema_graph(file_path, import_paths, cache, set())
317 if file_graph is None:
318 return False
319 graph.extend(file_graph)
320 if not validate_kotlin_import_packages(graph):
321 return False
322 return validate_kotlin_output_paths(graph, grpc=grpc)
323
324
325def validate_csharp_files(

Callers 1

cmd_compileFunction · 0.85

Calls 5

collect_schema_graphFunction · 0.85
extendMethod · 0.80
setFunction · 0.50

Tested by

no test coverage detected