https://github.com/abhinav/buf-include_imports-strategy-repro
https://github.com/abhinav/buf-include_imports-strategy-repro
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abhinav/buf-include_imports-strategy-repro
- Owner: abhinav
- Archived: true
- Created: 2024-06-06T21:30:22.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-06T21:35:17.000Z (12 months ago)
- Last Synced: 2024-10-08T07:40:44.048Z (8 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
❯ buf --version
1.32.2
```To reproduce, run `buf generate`.
This will produce:```
❯ buf generate
protoc: common/v1/value.proto, keyvalue/v1/service.proto
```**Expected output**:
```
protoc: common/v1/value.proto
protoc: keyvalue/v1/service.proto
```---
Dropping `include_imports` and adding the import to inputs manually fixes it.
```diff
diff --git a/buf.gen.yaml b/buf.gen.yaml
index 579a6dd..9b4667d 100644
--- a/buf.gen.yaml
+++ b/buf.gen.yaml
@@ -10,10 +10,10 @@ plugins:
- local: ["go", "run", "./cmd/protoc-gen-custom"]
out: gen/go
opt: paths=source_relative
- include_imports: true
strategy: directory
inputs:
- directory: proto
paths:
- proto/keyvalue
+ - proto/common
``````
❯ buf generate
protoc: keyvalue/v1/service.proto
protoc: common/v1/value.proto
```