grpc / grpc-swift

The Swift language implementation of gRPC.
Apache License 2.0
2.01k stars 413 forks source link

FileNaming (and other options) are not exposed to the SPM plugin #1818

Open EraYaN opened 6 months ago

EraYaN commented 6 months ago

Is your feature request related to a problem? Please describe it.

When using the SPM Plugin you can not specify FileNaming which will lead often to name collisions which swift really does not like.

Describe the solution you'd like

Some way to either add arbitrary arguments to the protoc call form the json file. Or explicit support for all possible options the generator supports.

Describe alternatives you've considered

I can of course stop using the SPM plugin and generate all the code myself, but I'd much rather keep using the SPM plugin.

Additional context

The pull request this option was added.

glbrntt commented 6 months ago

I don't think there's any reason not to add this; we added it to the SwiftProtobuf plugin (https://github.com/apple/swift-protobuf/blob/main/Plugins/SwiftProtobufPlugin/plugin.swift). Adding it to gRPC Swift should be very similar.

adam-rocska commented 4 months ago

It would be really lovely to have the "fileNaming": "PathToUnderscores", and its pals introduced.