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

[BUG] edition keyword not supported #1202

Open
khatibomar opened this issue Dec 19, 2024 · 2 comments
Open

[BUG] edition keyword not supported #1202

khatibomar opened this issue Dec 19, 2024 · 2 comments
Labels
Bug Reports and/or fixes a bug Help Wanted Community support requested

Comments

@khatibomar
Copy link

Description

So after google release a blog about using the new google opaque API, I wanted to build a dummy project using it and buf ( first time trying buf )

Steps to Reproduce

// ./proto/helloworld.proto

edition = "2023";

option go_package = "github.com/khatibomar/haykal/examples/helloworld/helloworld";

package helloworld;

service GreeterService {
  rpc SayHello(SayHelloRequest) returns (SayHelloResponse) {}
}

message SayHelloRequest { string name = 1; }

message SayHelloResponse { string message = 1; }
// buf.yaml
version: v2
modules:
  - path: ./proto
lint:
  use:
    - STANDARD
breaking:
  use:
    - FILE
// buf.gen.yaml
version: v2
plugins:
  - remote: buf.build/protocolbuffers/go
    out: gen/go
    opt:
      - paths=source_relative
      - default_api_level=api_opaque
  - remote: buf.build/bufbuild/validate-go
    out: gen/go
    opt: paths=source_relative
  - remote: buf.build/grpc/go
    out: gen/go
    opt: paths=source_relative
  - remote: buf.build/connectrpc/go
    out: gen/go
    opt: paths=source_relative

Expected Behavior

It should generate without errors

Actual Behavior

Failure: plugin "buf.build/bufbuild/validate-go" does not support feature "supports editions" which is required by "helloworld.proto"

Environment

  • Operating System: Linux
  • Version: Pop os
  • Compiler/Toolchain: go 1.23.4
  • Protobuf Compiler & Version: buf1.47.2, protoc 3.12.4

Possible Solution

Additional Context

@khatibomar khatibomar added the Bug Reports and/or fixes a bug label Dec 19, 2024
@rodaine
Copy link
Member

rodaine commented Dec 19, 2024

Hi, @khatibomar! protovalidate (this project) does not have any code generation. The plugin you are referring to is from the predecessor project, protoc-gen-validate. I am moving this issue to that project.

@rodaine rodaine transferred this issue from bufbuild/protovalidate Dec 19, 2024
@rodaine
Copy link
Member

rodaine commented Dec 19, 2024

If you want to use protovalidate (which we recommend), there is no associated plugin. See the README of https://github.com/bufbuild/protovalidate-go

@rodaine rodaine added Help Wanted Community support requested Good First Issue Newcomer-friendly issue and removed Good First Issue Newcomer-friendly issue labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reports and/or fixes a bug Help Wanted Community support requested
Projects
None yet
Development

No branches or pull requests

2 participants