Buf generated duplicate file with protoc-gen-ts
See original GitHub issue# buf.yaml
version: v1
deps:
- buf.build/googleapis/googleapis
# buf.gen.yaml
version: v1
plugins:
- name: ts
out: ./proto
opt:
- generate_dependencies
- long_type_string
- client_generic
- server_none
path: ./node_modules/.bin/protoc-gen-ts
The output of buf generate
:
Warning: Duplicate generated file name "google/protobuf/descriptor.ts". Buf will continue without error here and drop the second occurrence of this file, but please raise an issue with the maintainer of the plugin.
Warning: Duplicate generated file name "google/api/http.ts". Buf will continue without error here and drop the second occurrence of this file, but please raise an issue with the maintainer of the plugin.
protoc-gen-ts may need to ignore files that have already been generated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Duplicate generated file name #366 - stephenh/ts-proto
I encountered the following warning when using. http://buf.build Import ... Warning: Duplicate generated file name "google/protobuf/any.ts".
Read more >Usage - Buf docs - Buf.build
All buf operations rely on building, or compiling, Protobuf files. The linter, breaking change detector, generator, and the BSR are features that rely...
Read more >How to avoid copying vendor proto dependencies on buf ...
My question is, whenever I run buf generate --path=./proto (please notice path is set as a directory), I get googleapis pb.go files copied...
Read more >Generating stubs using buf | gRPC-Gateway - GitHub Pages
yaml file, or direct JSON or YAML data. As opposed to protoc , where all .proto files are manually specified on the command-line,...
Read more >Generating code
Generating code. We mentioned earlier that the ELIZA service defines a Protocol Buffer schema. So what is that schema? It is really just...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
strategy: all
is the correct setting. While most plugins need the defaultdirectory
strategy, protobuf-ts doesn’t.I’ve added an example that also works with dependencies from the BSR.
This might be an effective solution, provide packages like
@protobuf-ts/google-api
/@protobuf-ts/well-known-types
and let the generated code import them.