Skip to documentation
SLOP

tiny.choir.composition.diagnostic

Reference tiny.choir composition diagnostic

Defined in composition.

API (1)

Actions

Public operations.

No direct callersNo direct callscompositiondiagnostic
Static calls · unresolved targets: unknown · external targets: unknown.

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);}
Called byCallstest sourcelib.choir.src.composition.diagnostic.pathtest: composition path diagnostic ren...private sourcelib.choir.src.composition.diagnostic.pathappendAddressprivate sourcelib.choir.src.composition.diagnostic.pathappendArtifactprivate sourcelib.choir.src.composition.diagnostic.pathappendBoundaryprivate sourcelib.choir.src.composition.diagnostic.pathappendExportprivate sourcelib.choir.src.composition.diagnostic.pathappendImport+7 morecomposition.diagnosticrenderPathAlloc
Static calls · unresolved targets: 1 · external targets: 8.

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.

Audit

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433