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

How to use native third-party dependencies #2622

Closed
sishui opened this issue Nov 24, 2023 · 1 comment
Closed

How to use native third-party dependencies #2622

sishui opened this issue Nov 24, 2023 · 1 comment

Comments

@sishui
Copy link

sishui commented Nov 24, 2023

This is my dir:

│  buf.gen.yaml
│  buf.work.yaml
│
├─proto
│      buf.yaml
│      test.proto
│
└─vendor
    └─status
            buf.yaml
            status.proto

vendor third-party dependencies
proto/proto is my test proto
buf.work.yaml's contents :

version: v1
directories:
  - proto
  - vendor

buf.gen.yaml's contents:

version: v1
managed:
  enabled: true
  go_package_prefix:
    default: this.is.mypackage
    except:
      - buf.build/googleapis/googleapis

plugins:
  - plugin: go
    out: ./api
    opt:
      - paths=source_relative
  - plugin: go-thirdparty-plugin
    out: ./api
    opt:
      - paths=source_relative

I use buf generate command, it generates test.pb.go and 3rd party *.pb.go, but I only want to generate my own file (only reference 3rd party libraries, not generate 3rd party libraries), what should I do? thanks!!!

@bufdev
Copy link
Member

bufdev commented Dec 4, 2023

buf generate proto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants