Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 15, 2025

Bumps build.buf:protovalidate from 0.2.1 to 0.8.0.

Release notes

Sourced from build.buf:protovalidate's releases.

v0.8.0

Breaking Changes

New API for creating a validator.

Validators are now created via ValidatorFactory using a builder pattern. To migrate, users should make the following changes:

With no config

import build.buf.protovalidate.Validator;
+ import build.buf.protovalidate.ValidatorFactory;

Validator validator = new Validator();


Validator validator = ValidatorFactory.newBuilder().build();

With config

import build.buf.protovalidate.Validator;
+ import build.buf.protovalidate.ValidatorFactory;
Config cfg = Config.newBuilder().setFailFast(true).build();

Validator validator = new Validator(cfg);


Validator validator = ValidatorFactory.newBuilder().withConfig(cfg).build();

Also note that the returned type is an interface (still named Validator) and no longer a concrete class.

In addition to the above change, users can now seed the validator with descriptors for warming up the cache. To do so, use the buildWithDescriptors method on the builder. The signature is:

buildWithDescriptors(List<Descriptor>, boolean disableLazy) throws CompilationException, InvalidStateException;

An example creating a validator with seed descriptors:

MyMessage msg = MyMessage.newBuilder().build();
List<Descriptor> seedDescriptors = new ArrayList<Descriptor>();
seedDescriptors.add(msg.getDescriptorForType());
try {
Validator validator = ValidatorFactory.newBuilder().buildWithDescriptors(seedDescriptors, false);
// Note you can also create a validator with a config
// Validator validator = ValidatorFactory.newBuilder().withConfig(cfg).buildWithDescriptors(seedDescriptors, false);
// Also note that the buildWithDescriptors function is what throws the exception so the validator
// builder can be created ahead of time with no need for catching an exception.

</tr></table>

... (truncated)

Commits
  • 94f2c28 Upgrade to Protovalidate 0.11.1 (#287)
  • ff29603 Refactor validator creation to support various configurations (#283)
  • 45271ab Fix operator in ValidationResult toString (#286)
  • fd4472a Bump org.projectnessie.cel:cel-bom from 0.5.1 to 0.5.3 (#284)
  • d71d6bc Enable auto release to Maven Central (#282)
  • bf50d4b Switch from s01 to Maven central (#281)
  • 2ec0a85 Bump com.uber.nullaway:nullaway from 0.12.6 to 0.12.7 (#280)
  • 0e6b4d1 Add TypeScript / JavaScript to the supported languages in README.md (#279)
  • ffe0dd3 Fix CEL bindings for maps (#278)
  • 04f235f Fix some formatting issues (#277)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by Sourcery

Build:

  • Upgrade build.buf:protovalidate library to version 0.8.0

Bumps [build.buf:protovalidate](https://github.com/bufbuild/protovalidate-java) from 0.2.1 to 0.8.0.
- [Release notes](https://github.com/bufbuild/protovalidate-java/releases)
- [Commits](bufbuild/protovalidate-java@v0.2.1...v0.8.0)

---
updated-dependencies:
- dependency-name: build.buf:protovalidate
  dependency-version: 0.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels May 15, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented May 15, 2025

Reviewer's Guide

This PR updates the Maven dependency for build.buf:protovalidate from 0.2.1 to 0.8.0 by adjusting the version in pom.xml, pulling in breaking changes around Validator instantiation (now via ValidatorFactory and optional descriptor seeding). Reviewers should confirm the dependency bump is correct and ensure any existing Validator usages are migrated to the new API.

File-Level Changes

Change Details Files
Bump protovalidate dependency version
  • Updated build.buf:protovalidate version from 0.2.1 to 0.8.0
pom.xml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 3, 2025

Superseded by #74.

@dependabot dependabot bot closed this Jun 3, 2025
@dependabot dependabot bot deleted the dependabot/maven/build.buf-protovalidate-0.8.0 branch June 3, 2025 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants