Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax root overlap requirements for buf protoc #351

Closed
bufdev opened this issue Jun 28, 2021 · 3 comments
Closed

Relax root overlap requirements for buf protoc #351

bufdev opened this issue Jun 28, 2021 · 3 comments
Labels
Bug Something isn't working

Comments

@bufdev
Copy link
Member

bufdev commented Jun 28, 2021

See cockroachdb/cockroach#66913 (comment)

$ protoc -o /dev/null -I proto -I . $(buf ls-files proto)
buf/alpha/registry/v1alpha1/resolve.proto:20:1: warning: Import buf/alpha/registry/v1alpha1/module.proto is unused.
$ buf protoc -o /dev/null -I proto -I . $(buf ls-files proto)
include directory "/home/foo/dev/buf/proto" is within include directory "/home/foo/dev/buf" which is not allowed
@bufdev
Copy link
Member Author

bufdev commented Jun 29, 2021

Notes to self:

# takes the first include that it is in
$ protoc -o /dev/stdout -I . -I pkg  pkg/a/a.proto | buf build -o -#format=json -
{"file":[{"name":"pkg/a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}
$ buf protoc -o /dev/stdout -I . -I pkg  pkg/a/a.proto | buf build -o -#format=json -
{"file":[{"name":"pkg/a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}

# takes the first include that it is in
$ protoc -o /dev/stdout -I pkg -I .  pkg/a/a.proto | buf build -o -#format=json -
{"file":[{"name":"a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}
# does *not* take the first include that it is in
$ buf protoc -o /dev/stdout -I pkg -I .  pkg/a/a.proto | buf build -o -#format=json -
{"file":[{"name":"pkg/a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}

# takes the only include that it is in
$ protoc -o /dev/stdout -I pkg -I .  a/a.proto | buf build -o -#format=json -
{"file":[{"name":"a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}
# takes the only include that it is in
$ buf protoc -o /dev/stdout -I pkg -I .  a/a.proto | buf build -o -#format=json -
{"file":[{"name":"a/a.proto","package":"a","messageType":[{"name":"Foo"}],"syntax":"proto3"}],"bufbuildImageExtension":{}}

@bufdev
Copy link
Member Author

bufdev commented Jun 29, 2021

#353 is strongly related to this and will likely be fixed simultaneously.

@bufdev
Copy link
Member Author

bufdev commented Feb 4, 2022

We have now deleted buf protoc by moving it to alpha in #915, and will likely eventually delete it entirely. As such, going to close this issue as buf protoc will almost for sure not be worked on in the future. If we decide to revisit this decision, we should reopen this issue. All issues that were closed are tracked on the #915.

@bufdev bufdev closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant