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

buf.yaml v2 Annotated buf.yaml configuration includes invalid values #3501

Closed
KinNeko-De opened this issue Dec 1, 2024 · 3 comments
Closed

Comments

@KinNeko-De
Copy link

KinNeko-De commented Dec 1, 2024

GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)

https://buf.build/docs/configuration/v2/buf-yaml/

What's up?

Hey..
I am currently writing an article about the integration of buf in visual studio code.
I tried to managed a gitrepository which contains the apis for multiple applications.

I finally found a version where buf lint --config buf.yaml does not report errors because of a wrong package name.

I found the solution with the documentaion: https://buf.build/docs/configuration/v2/buf-yaml/ and the following lines:

  # Multiple modules are allowed to have the same path, as long as they don't share '.proto' files.
  - path: proto/common
    module: buf.build/acme/weather
    includes:
      - proto/common/weather
  - path: proto/common
    module: buf.build/acme/location
    includes:
      - proto/common/location

But module is no a valid field for a yaml. Buf lint reports an error when parsing the buf.yaml

It must be replaced with name

  # Multiple modules are allowed to have the same path, as long as they don't share '.proto' files.
  - path: proto/common
    name: buf.build/acme/weather
    includes:
      - proto/common/weather
  - path: proto/common
    name: buf.build/acme/location
    includes:
      - proto/common/location

Can you please confirm that my buf.yaml is correct? Buf lint now works without problems, but the visual studio extension does not show any errors anymore. I will create then an issue in the vs code extension github repository. I guess that the vs code extension does not support the changes from august.

Greetings

Nils

@doriable doriable changed the title buf.yam v2 Annotated buf.yaml configuration includes invalid values buf.yaml v2 Annotated buf.yaml configuration includes invalid values Dec 2, 2024
@doriable
Copy link
Member

doriable commented Dec 2, 2024

Thank you for filing this issue, your buf.yaml appears to be correct, and yes, the key should be name not module -- we'll correct the documentation!
For the vscode extension issue, do you mind filing a separate issue against the vscode extension outlining the exact issues you are seeing with the extension specifically? https://github.com/bufbuild/vscode-buf/issues

@KinNeko-De
Copy link
Author

KinNeko-De commented Dec 2, 2024

Yes I will do that. With version number, log etc.

Thank you.

@doriable
Copy link
Member

doriable commented Dec 3, 2024

Going to close this issue, we have a change to the documentation in review right now, and we'll address the remainder of this on the VSCode issue. Thanks!

@doriable doriable closed this as completed Dec 3, 2024
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