Skip to content

ProtoInfo created descriptor sets should include the proto file comments #9337

Closed as not planned
@thomasvl

Description

@thomasvl

ProtoInfo.*_descriptor_sets appear to be built without the source comments from the proto file. Well done proto generators also relay the comments into the generated source so IDEs that do source indexing and pick them up to provide contextual tooltips/documentation/etc.

While there are way to a developer to invoke bazel with extra args to work around this (--protocopt=--include_source_info) we don't really want to encourage developers to have to use lots of custom flags for their builds, and with the use of remote action caches the use/lack of this flag means cache impacts.

So since the descriptor sets are in the provider for generation rules, it seems like they should provide the sets with comments. This also means the source generated during a build would match what a developer would get if they just invoked protoc by hand with the .proto files available since generated from parsed proto files always includes comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-Rules-ServerIssues for serverside rules included with Bazeltype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions