Skip to content

Failing to build Perfetto protobuf schemas #10

@zmitchell

Description

@zmitchell

Hey, this could absolutely be user error, but I'm getting these errors trying to build bindings for the Perfetto protobuf schemas:

Failed to parse file /home/zmitchell/.cache/zig/p/N-V-__8AACqpdQYd8TVO_tA8wrl-fF2G7rPfP9Xdt5dZ5I_O/protos/third_party/chromium/optimization_guide/actions_data.proto [offset = 1035]:
Error: error.InvalidConst
31:   int32 content_node_id = 1 [features = { field_presence: EXPLICIT }];
                                       ^
Failed to parse file /home/zmitchell/.cache/zig/p/N-V-__8AACqpdQYd8TVO_tA8wrl-fF2G7rPfP9Xdt5dZ5I_O/protos/third_party/chromium/optimization_guide/common_quality_data.proto [offset = 915]:
Error: error.InvalidConst
30:   FloatArray floats = 1 [features = { field_presence: EXPLICIT }];
                                   ^
cannot resolve import protos/perfetto/metrics/metrics.proto from /home/zmitchell/.cache/zig/p/N-V-__8AACqpdQYd8TVO_tA8wrl-fF2G7rPfP9Xdt5dZ5I_O/protos/perfetto/metrics/webview/all_webview_metrics.proto with root /home/zmitchell/.cache/zig/p/N-V-__8AACqpdQYd8TVO_tA8wrl-fF2G7rPfP9Xdt5dZ5I_O/protos
error: failed to generate protobuf code: TargetFileNotFound
gen
└─ protobuf failure
error: TargetFileNotFound

The source is here for those protobuf schemas: https://github.com/google/perfetto/tree/v53.0/protos

This is what my ProtoGenStep looks like:

const proto_gen_step = ProtoGenStep.create(b, .{
    .name = "protobuf",
    .proto_sources = perfetto_src.path("protos"),
    .target = b.path("src/gen"),
});

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions