Skip to content

Bug: Wrong generated file name error with paths=imports option & module option without trailing slash #350

@albenik

Description

@albenik

Steps to reproduce:

  1. Prepare simple project with Twirp rpc proto
  2. Execute
     protoc --go_out=out ­­–go_opt=paths=import,module=example.com/module/package \
         ­­--twirp_out=out --twirp_opt=paths=import,module=example.com/module/package service.proto
    

Expected result

Normal code generation

Actual result

The error:

Failure: plugin twirp: Generated file name "/somepath/service.twirp.go" does not conform to the Protobuf generation specification. Note that the file name must be relative, and not use "..". Please raise an issue with the maintainer of the plugin and reference https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L122

Note

There were no errors from protoc_gen_go plugin, so path options are correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions