chore(deps): bump protovalidate-kt to 0.1.2 so AccessContext validates - #8
Merged
Conversation
The scope oneof marks each arm required, and 0.1.1 emitted every arm's required check unguarded, so whichever arm was set the others reported "value is required" and no AccessContext could pass client-side validation. GetBlobsRequest.context was unusable as a result — code-android-app had to validate the request before attaching a scope. 0.1.2 guards each arm's check on that arm being selected. AccessContextValidator is the only one of the 203 generated validators whose output changes; no other message in this contract has a required oneof arm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
blob.v1.AccessContextcould not be validated. Itsscopeoneof marks each armrequired, and protovalidate-kt 0.1.1 emitted every arm's required check unguarded:Setting
chatfailed asprofile: value is required, settingprofilefailed aschat: value is required, and setting neither failed as both.GetBlobsRequest.contextwas therefore unusable —code-android-appworks around it today by validating the request before attaching a scope, which leaves the context unchecked.protovalidate-kt 0.1.2 guards each arm's check on that arm being the selected one, and reports an unset oneof once as
scope: exactly one field is required in oneof.Regenerating with 0.1.2 moves exactly one of the 203 generated validators,
AccessContextValidator.kt— no other message in this contract has arequiredoneof arm. No contract change, and Swift is untouched: protovalidate-kt generates Kotlin only.Wants a
0.4.1publish once merged; the changelog entry is in this PR.