tensorflow: Duplicated Java outer classname

Describe the current behavior Option values of java_outer_classname in tensorflow/compiler/tf2xla/host_compute_metadata.proto and tensorflow/compiler/tf2xla/tf2xla.proto are the same, result in protoc failure for Java:

> protoc: stdout: . stderr: tensorflow/compiler/xla/rpc/xla_service.proto: warning: Import tensorflow/compiler/xla/xla_data.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/framework/graph.proto but not used.
  tensorflow/core/protobuf/replay_log.proto: warning: Import tensorflow/core/protobuf/cluster.proto but not used.
  org/tensorflow/tf2xla/Tf2XlaProtos.java: Tried to write the same file twice.

Describe the expected behavior protoc succeeds without error. java_outer_classname in tensorflow/compiler/tf2xla/host_compute_metadata.proto may be renamed to HostComputeMetadataProtos

Code to reproduce the issue

Just protoc

Other info / logs

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Still facing the same issue. @YuanWenqing Any solution or update on the issue?

No better solution but correct it manually ╮(╯▽╰)╭

I suppose this issue is very clear and just a typo mistake.

Look at these two files and check:

tensorflow/compiler/tf2xla/host_compute_metadata.proto tensorflow/compiler/tf2xla/tf2xla.proto

They both share the same java_outer_classname option value, so that error org/tensorflow/tf2xla/Tf2XlaProtos.java: Tried to write the same file twice. encountered when compiling proto files under tensorflow/compiler/tf2xla into java.

I see there is a naming convention in this project for the java_outer_classname option value: a snake-to-camel conversion from the filename and then Protos suffix appended. So java_outer_classname option value should be like HostComputeMetadataProtos in file tensorflow/compiler/tf2xla/host_compute_metadata.proto , but now Tf2XlaProtos is there.

Isn’t this a simple typo mistake, right?