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] expression_pb2.py is not being generated #223

Open
martin-varbanov96 opened this issue Dec 4, 2024 · 3 comments
Open

[BUG] expression_pb2.py is not being generated #223

martin-varbanov96 opened this issue Dec 4, 2024 · 3 comments
Labels
Bug Something isn't working

Comments

@martin-varbanov96
Copy link

Description

I had a working buf setup which was working perfectly and after one rebuild I noticed that something was wrong, eventually I found out that the expression_pb2.py is not being generated.

Tried with different proto versions, different PCs.

I was not able to find the expression proto file and where it's generated.

Steps to Reproduce

Expected Behavior

Actual Behavior

Screenshots/Logs

Environment

  • Operating System: Linux
  • Version: Arch; Bluefin
  • Compiler/Toolchain:
  • Protobuf Compiler & Version:
  • Protoc-gen-validate Version:
  • Protovalidate Version: from latest, down to 0.7.1

Possible Solution

My workaround solution was to switch back to v0.7.1 in the buf.yaml file:

buf.build/bufbuild/protovalidate:v0.7.1

Additional Context

@martin-varbanov96 martin-varbanov96 added the Bug Something isn't working label Dec 4, 2024
@stefanvanburen
Copy link
Member

hey @martin-varbanov96, what version of protovalidate-python are you using? As noted in the v0.5.0 release notes, you'll want to update imports from using the generated buf.validate.expression_pb2 to use buf.validate.validate_pb2; you shouldn't need to use generated code from expression.proto now.

@martin-varbanov96
Copy link
Author

martin-varbanov96 commented Dec 5, 2024

I was using 0.4.0, I will verify that everything is working with 0.5.0, but in the requirements.in file I did not specify any version... shouldn't it install the latest version? I am using python 3.12.4 . now I have forced it with protovalidate==0.5.0 I guess this should fix the problem

@stefanvanburen
Copy link
Member

I'm only somewhat familiar with the requirements.in workflow, but my understanding is that at some point you'd convert that file into a requirements.txt, which may have pinned the previous version.

We do expect some minor breaking changes as we iterate pre-1.0, so it might be better if we pinned the protovalidate module in our README to a particular version known to work with the latest release, but it's just one more place to fall out of date. Once we reach 1.0, we shouldn't have breaking changes like that. Let me know if 0.5.0 doesn't work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants