tiny.choir.composition.diagnostic
Defined in composition.
API (1)
Actions
Public operations.
Source
Source: lib/choir/src/composition/diagnostic/path.zig:14
zig
pub fn renderPathAlloc( allocator: Allocator, module: *const CompositionModule, variant_id: composition.CompositionVariantId, call_site_id: composition.CallSiteId,) ![]u8 { try module.verify(); const path = try module.diagnosticPath(variant_id, call_site_id); const caller = module.fragment(path.call_site.caller).?; const caller_export = caller.exportByName(path.call_site.caller_export).?; const runtime_import = caller.importByName(path.call_site.runtime_import).?; var arena_state = alloc_arena.Arena.init(allocator); defer arena_state.deinit(); const arena = arena_state.allocator(); const title = try std.fmt.allocPrint(arena, "composition path: {s}", .{path.call_site.name}); var report = try Report.init(arena, title); defer report.deinit(); try report.section("source"); try appendLocation(&report, path.source.*); try report.line("operation {s}", .{path.source.symbol}); try report.line("module {s}", .{module.source_module.name}); try report.section("variant"); try report.line("[{d}]", .{path.variant.id.value}); try appendAddress(&report, "target", path.variant.choice.target); try appendAddress(&report, "policy", path.variant.choice.policy); try report.section("partition"); try report.line("[{d}] {s}", .{ path.partition.id.value, path.partition.name }); try appendAddress(&report, "semantic product", path.partition.product); try report.line("effect {s}", .{@tagName(path.partition.effect)}); for (path.partition.inputs) |id| try appendBoundary(&report, arena, module, "input", id); for (path.partition.outputs) |id| try appendBoundary(&report, arena, module, "output", id); try report.section("pipeline"); try appendProduct(&report, "pipeline input", path.pipeline_input); try report.line("pipeline {s}", .{@tagName(path.fragment.pipeline)}); try report.section("fragment"); try report.line("[{d}] {s}", .{ path.fragment.id.value, @tagName(path.fragment.pipeline) }); try appendExport(&report, path.fragment_export.*); for (path.fragment.exports) |*export_value| { if (export_value != path.fragment_export) try appendExport(&report, export_value.*); } for (path.fragment.imports) |import_value| try appendImport(&report, import_value); try report.section("call site"); try report.line("[{d}] {s}", .{ path.call_site.id.value, path.call_site.name }); try report.line( "route [{d}].{s} -> {s} -> [{d}].{s} (ABI v{d})", .{ path.call_site.caller.value, path.call_site.caller_export, path.call_site.runtime_import, path.call_site.callee.value, path.call_site.callee_export, path.call_site.abi_version, }, ); try report.line("caller export {s} -> {s}", .{ caller_export.name, caller_export.symbol }); try appendImport(&report, runtime_import.*); for (path.call_site.inputs) |id| try appendBoundary(&report, arena, module, "input", id); for (path.call_site.outputs) |id| try appendBoundary(&report, arena, module, "output", id); try report.section("artifact"); try appendArtifact(&report, path.artifact); const rendered = try report.renderAlloc(.{ .width = 100 }); return try allocator.dupe(u8, rendered);}Source: lib/choir/src/composition/diagnostic/root.zig
zig
const path = @import("path.zig");pub const renderPathAlloc = path.renderPathAlloc;Source: lib/choir/src/composition/root.zig:8
zig
pub const diagnostic = @import("diagnostic/root.zig");Complete call list for composition.diagnostic.renderPathAlloc
12 direct calls.
lib.choir.src.composition.diagnostic.path.appendAddress[function] — private source atlib/choir/src/composition/diagnostic/path.zig:97in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendArtifact[function] — private source atlib/choir/src/composition/diagnostic/path.zig:170in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendBoundary[function] — private source atlib/choir/src/composition/diagnostic/path.zig:110in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendExport[function] — private source atlib/choir/src/composition/diagnostic/path.zig:156in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendImport[function] — private source atlib/choir/src/composition/diagnostic/path.zig:163in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendLocation[function] — private source atlib/choir/src/composition/diagnostic/path.zig:87in nearest public ownerlib.choir.src.composition.diagnostic.pathlib.choir.src.composition.diagnostic.path.appendProduct[function] — private source atlib/choir/src/composition/diagnostic/path.zig:103in nearest public ownerlib.choir.src.composition.diagnostic.pathtiny.choir.composition.module.fragment[module] atlib/choir/src/composition/module/fragment.zigtiny.pretty.diagnostic.Report.init[function] atlib/pretty/core/src/diagnostic.zig:17tiny.pretty.diagnostic.Report.line[method] atlib/pretty/core/src/diagnostic.zig:51tiny.pretty.diagnostic.Report.renderAlloc[method] atlib/pretty/core/src/diagnostic.zig:75tiny.pretty.diagnostic.Report.section[method] atlib/pretty/core/src/diagnostic.zig:45
Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |