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

Update buf.lock for protovalidate-testing #57

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

pkwarren
Copy link
Member

protovalidate-testing requires the new FloatRules.finite field to compile, so we need to update the buf.lock file to include it.

protovalidate-testing requires the new FloatRules.finite field to
compile, so we need to update the buf.lock file to include it.
@pkwarren pkwarren requested review from rodaine and Alfus July 20, 2023 21:46
@@ -4,5 +4,5 @@ deps:
- remote: buf.build
owner: bufbuild
repository: protovalidate
commit: 890d7e3584ce4bb29af9fe953393a3a2
digest: shake256:878c6bf315f37310a6315de26f409548d2951b9f8f042a8a599973496fd0298680554dba152924264b9c41f5bd05adbc4b3fcedfc2156e1707006f45fddd9db0
commit: f9bf3460ccf141d68ba17653f5ef85dc
Copy link
Member Author

@pkwarren pkwarren Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkwarren pkwarren merged commit 7a2bf40 into main Jul 20, 2023
2 checks passed
@pkwarren pkwarren deleted the pkw/update-protovalidate-testing-lock branch July 20, 2023 21:50
igor-tsiglyar pushed a commit to igor-tsiglyar/protovalidate that referenced this pull request Apr 16, 2024
…ion types (bufbuild#57)

The go proto library struggles to resolve values for extensions if the
concrete type associated with the generated source code on hand does not
match that on the descriptor of the message in question (which happens
in cases where the descriptor or message is produced at runtime). This
manifested in the protovalidate resolver where the extension could not
be found on options attached to a descriptor produced dynamically.

Unfortunately, I struggled to find a way to get the extension and its
value directly. (I'm not even sure how to get the field/ext descriptor
from the descriptor; `protoreflect.Fields.ByNumber` doesn't work). The
most straightforward solution from a few iterations was to leverage
`proto.RangeExtensions`.

There's room here for some mild optimization to short circuit in most
vanilla situations but it makes it a bit less readable. Since this only
happens once per descriptor, the optimization is overkill IMO.
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

Successfully merging this pull request may close these issues.

2 participants