Skip to content

Failing to parse multiline string #11

@thng292

Description

@thng292

Input

I'm trying to generate code from https://github.com/openxla/xla. Here is the part which caused the error:

syntax = "proto3";

package xla;

option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/compiler/"
                    "xla/pjrt/distributed/protocol_go_proto";

message IntValuesProto {
  repeated int64 values = 1;
}

Output

Failed to parse file /media/data/Code/zig/zig-pjrt-wrapper/xla/xla/pjrt/distributed/protocol.proto [offset = 1268]:
Error: error.SemicolonExpected
32:                     "xla/pjrt/distributed/protocol_go_proto";
                    ^
cannot resolve import tsl/profiler/protobuf/profiler_service.proto from /media/data/Code/zig/zig-pjrt-wrapper/xla/third_party/tsl/tsl/profiler/protobuf/profiler_analysis.proto with root /media/data/Code/zig/zig-pjrt-wrapper/xla
error: failed to generate protobuf code: TargetFileNotFound

How to reproduce:

  1. Clone https://github.com/openxla/xla
  2. Generate code using this config:
    const protobuf = ProtoGenStep.create(
        b,
        .{
            .name = "protobuf", // Name for the build step
            .proto_sources = b.path("xla"), // Directory containing .proto files
            .target = b.path("src/protos"), // Output directory for generated Zig code
        },
    );

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