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

[Feature Request] Add to scalapb common protos #194

Open
sacsar opened this issue Apr 11, 2024 · 3 comments
Open

[Feature Request] Add to scalapb common protos #194

sacsar opened this issue Apr 11, 2024 · 3 comments
Labels
Feature New feature or request Good First Issue Good issues for first-time contributors Language Support Interest in adding support for another language

Comments

@sacsar
Copy link

sacsar commented Apr 11, 2024

Feature description:

Update https://github.com/scalapb/common-protos to include the protovalidate protos, not (only) the protoc-gen-validate protos.

Problem it solves or use case:

In order to use scalapb-generated code, one needs a scalapb-generated class for all the dependent protos. Depending on protovalidate-java as the source of protos won't work, even if one can use the library for validation.

Proposed implementation or solution:

Add protovalidate-java as a dependency in scalapb/common-protos.

Contribution:

I might just do it myself, but I don't know when I'll get to it. I'm currently working around it by vendoring the protos and just generating code for them directly.

Examples or references:

The pgv protos are added to scalapb/common-protos in https://github.com/scalapb/common-protos/blob/e4e0254817d801a009d63b1e51be81b0f1f00b63/build.sbt#L32

@sacsar sacsar added the Feature New feature or request label Apr 11, 2024
@rodaine rodaine added Language Support Interest in adding support for another language Good First Issue Good issues for first-time contributors labels Apr 11, 2024
@ns-jiew
Copy link

ns-jiew commented Apr 30, 2024

@sacsar I ran into an issue when the protobuf with "import "buf/validate/validate.proto" compile by scalapb

Import "buf/validate/validate.proto" was not found or had errors.

Could you share how you fix it?

@sacsar
Copy link
Author

sacsar commented May 1, 2024

I'm just generating code with scalapb for the protovalidate protos alongside my protos that reference them.

@ns-jiew
Copy link

ns-jiew commented May 1, 2024

Do you mean to download "buf/validate/validate.proto" to local and then run scalapb?
Could you share the build.sbt about protos compile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Good First Issue Good issues for first-time contributors Language Support Interest in adding support for another language
Projects
None yet
Development

No branches or pull requests

3 participants