bufbuild / buf

The best way of working with Protocol Buffers.

Home Page:https://buf.build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Field Deps Not Found in Type bufgen.ExternalConfigV1

au-z opened this issue · comments

Seems there may a simple explanation for this, but I can't seem to figure out what's wrong with these dependencies. Anyone know what may be going on?

# buf.gen.yaml
version: v1
deps:
  - buf.build/googleapis/googleapis
plugins:
  - plugin: es
    opt: target=ts
    out: src/proto
  - plugin: connect-es
    opt: target=ts
    out: src/proto
buf generate ./proto

Failure: could not unmarshal as YAML: yaml: unmarshal errors:
  line 2: field deps not found in type bufgen.ExternalConfigV1
buf --version
1.28.1

Hi @au-z! So you can use the deps field in the buf.yaml configuration file (which used to define a module) but not in the buf.gen.yaml configuration file (which is used with the buf generate command just as you have in your example).

It might be helpful to take a look at this tutorial through step 2.1 - it'll take you through the setup of both of these configuration files and demonstrate the different ways they're used!

🤦 Thanks @smallsamantha for the speedy assist! Closing this as resolved.