Skip to content

protoc not resolving arguments using include paths #353

@dt

Description

@dt

Given some directory layout under the current working directory like pkg/a/a.proto and lib/b/b.proto, this protobuf protoc invocation succeeds: protoc --go_out=tmp -I pkg -I lib a/a.proto. Note that the argument "a/a.proto" is not a path to a file in current working directory and is relying on being resolved using -I pkg.

The corresponding buf protoc invocation looks like it is not using the -I pkg to resolve its arguments:
buf protoc --go_out=tmp -I pkg -I lib a/a.proto returns

path "/Users/david/code/protodemo/a/a.proto" is not contained within any of roots "/Users/david/code/protodemo/lib", and "/Users/david/code/protodemo/pkg" - note that specified paths cannot be roots, but must be contained within roots

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions