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

Function validate_csharp_files

compiler/fory_compiler/cli.py:325–342  ·  view source on GitHub ↗

Preflight C# generated paths and module owners before writing output.

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

Source from the content-addressed store, hash-verified

323
324
325def validate_csharp_files(
326 files: List[Path],
327 import_paths: List[Path],
328 grpc: bool = False,
329) -> bool:
330 """Preflight C# generated paths and module owners before writing output."""
331 cache: Dict[Path, Schema] = {}
332 graph: List[Tuple[Path, Schema]] = []
333 for file_path in files:
334 file_graph = collect_schema_graph(file_path, import_paths, cache, set())
335 if file_graph is None:
336 return False
337 graph.extend(file_graph)
338 try:
339 return validate_csharp_generation(graph, grpc=grpc)
340 except ValueError as e:
341 print(f"Error: {e}", file=sys.stderr)
342 return False
343
344
345def validate_scala_import_packages(graph: List[Tuple[Path, Schema]]) -> bool:

Callers 1

cmd_compileFunction · 0.85

Calls 4

collect_schema_graphFunction · 0.85
extendMethod · 0.80
setFunction · 0.50

Tested by

no test coverage detected