Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 3, 2025

Bumps build.buf:protovalidate from 0.2.1 to 0.9.0.

Release notes

Sourced from build.buf:protovalidate's releases.

v0.9.0

Breaking Changes

String formatting is now conformant with the CEL spec.

As a result, some formatting output may differ from previous versions. See #293, #294, and #295 for details on formatting changes.

What's Changed

Full Changelog: bufbuild/protovalidate-java@v0.8.0...v0.9.0

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;

... (truncated)

Commits
  • 8342d2c Filter buf.gen.yaml files based on protoc version (#300)
  • 53aa216 Update buf.gen.yaml versions for protobuf (#299)
  • 8a1425d Bump org.junit:junit-bom from 5.12.2 to 5.13.0 (#296)
  • c0bd4f8 Bump com.diffplug.spotless:spotless-plugin-gradle from 7.0.3 to 7.0.4 (#297)
  • 976c284 Bump com.google.protobuf:protobuf-java from 4.31.0 to 4.31.1 (#298)
  • b5d806e Fix overload declaration for format (#295)
  • ce51220 Add supplemental format conformance tests (#294)
  • 256eb5c Add conformance testing to string.format implementation (#293)
  • 864c3f7 Bump com.palantir.git-version from 3.2.0 to 3.3.0 (#292)
  • 5c5bcb4 Generate code with the latest plugin version (#291)
  • 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:

  • Update build.buf:protovalidate version from 0.2.1 to 0.9.0 in pom.xml

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

---
updated-dependencies:
- dependency-name: build.buf:protovalidate
  dependency-version: 0.9.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 Jun 3, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 3, 2025

Reviewer's Guide

This PR updates the build.buf:protovalidate Java dependency from 0.2.1 to 0.9.0 by modifying the Maven pom, bringing in upstream breaking changes around CEL-spec string formatting and a new ValidatorFactory API (verify client code compatibility).

Sequence Diagram for New Validator Instantiation

sequenceDiagram
    actor ClientCode as "Client Code"
    participant VFactory as "ValidatorFactory"
    participant VBuilder as "ValidatorBuilder"
    participant ValIface as "Validator (Interface)"

    ClientCode->>VFactory: newBuilder()
    VFactory-->>ClientCode: vBuilder: ValidatorBuilder

    alt With Configuration
        ClientCode->>VBuilder: withConfig(config)
        VBuilder-->>ClientCode: vBuilder: ValidatorBuilder
    end

    ClientCode->>VBuilder: build()
    VBuilder-->>ClientCode: validator: Validator
Loading

Class Diagram for the New Validator API

classDiagram
    class ValidatorFactory {
        +newBuilder(): ValidatorBuilder
    }
    class ValidatorBuilder {
        +withConfig(Config cfg): ValidatorBuilder
        +build(): Validator
        +buildWithDescriptors(List~Descriptor~ descriptors, boolean disableLazy): Validator
    }
    class Config {
        %% Configuration object passed to the builder %%
    }
    class Validator {
        <<Interface>>
        %% Methods of the Validator interface %%
    }

    ValidatorFactory ..> ValidatorBuilder : provides
    ValidatorBuilder ..> Validator : creates
    ValidatorBuilder ..> Config : uses
Loading

File-Level Changes

Change Details Files
Bump protovalidate dependency version
  • Changed version tag from 0.2.1 to 0.9.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 5, 2025

Superseded by #76.

@dependabot dependabot bot closed this Jun 5, 2025
@dependabot dependabot bot deleted the dependabot/maven/build.buf-protovalidate-0.9.0 branch June 5, 2025 03:44
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