Skip to content

[protobuf] Generated protobuf Java classes should be prefixed with Protobuf #8256

@KangarooKoala

Description

@KangarooKoala

Rationale

Currently, the generated protobuf Java classes are not prefixed with Protobuf. (For example, Geometry2d.) This can cause clutter in intellisense recommendations- Although this isn't an issue for WPILib VSCode, it is still an issue for IDEs and the Javadoc search.

In addition, this naming scheme would better match the nested classes (which have that naming scheme to avoid ambiguity with the original class).

Desired solution

One option is to rename the *.proto files to protobuf_*.proto. Alternatively, we could specify option java_outer_classname = "Protobuf..."; in every .proto file.

Both options seem acceptable to me, but we should pick one and be consistent. Here's some thoughts I had about the different options:

protobuf_*.proto:

  • .proto and .java filenames are more consistent
  • Only one spot to rename (If we want to do that for some reason)
    java_outer_classname:
  • The output location is fully specified by consecutive java_package and java_outer_classname options

Context

See #6518 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    20272027 targetgood first issueGood for newcomers.type: choreFormatting, reorganizing, and other necessary (but less impactful) tasks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions