buf icon indicating copy to clipboard operation
buf copied to clipboard

Support swift_prefix override

Open q42jaap opened this issue 3 weeks ago • 1 comments

Feature

The file option swift_prefix isn't available as a buf.gen.yaml managed override.

When I try, buf refuses to parse the config:

version: v2
inputs:
  - directory: api
managed:
  enabled: true
  override:
    - path: user/v1
      file_option: swift_prefix
      value: UserV1

Results in the error.

Failure: decode config file: unknown file_option: "swift_prefix"

private/bufpkg/bufconfig/generate_managed_option.go has a limited list of file options where swift_prefix is absent.

swift_prefix is used by buf.build/connectrpc/swift and buf.build/apple/swift

Please add it to buf.gen.yaml config, now every file needs to have the swift_prefix repeated.

q42jaap avatar Dec 09 '25 09:12 q42jaap

Thank you for filing this issue! Currently, managed mode prioritises support for the built-in protoc plugins, however, I think this is a very reasonable request. We’re currently not able to prioritise this work immediately, but I’m happy to chat with the team and look into getting this implemented in the future.

doriable avatar Dec 09 '25 18:12 doriable