Skip to content

Request for file_extension option in C# protoc plugin #26056

@jskeet

Description

@jskeet

Note: this is not quite a duplicate of existing issues #25930 or #13726. I'm not asking for the existing csharp_opt to be used: I'm requesting a new option.

Problem

Over time, it's become more and more conventional for generated files to have an extension of .g.cs. There's currently no way of achieving that within the existing protoc plugin.

This may not be much of a problem when using Grpc.Tools to generate files on the fly, but when the generated files are checked into source control (as we do for google-cloud-dotnet) it would be nice to have a really clean separation of generated and non-generated code.

Describe the solution you'd like

A new option, to match the csharp_opt one, so protoc could be run with:

--csharp_opt=file_extension=.g.cs # For the messages etc
--grpc_opt=file_extension=.g.cs # For RPCs

Describe alternatives you've considered

Currently we perform this renaming in a generation script, which is pretty inconvenient.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions