Skip to content

Implement ValidatingBuilder instead of McJava #127

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

Merged
merged 10 commits into from
Jul 13, 2024

Conversation

alexander-yevsyukov
Copy link
Collaborator

@alexander-yevsyukov alexander-yevsyukov commented Jul 12, 2024

This PR makes the Validation library make Builder classes implement ValidatingBuilder instead of McJava.

Currently, McJava does that via the io.spine.tools.mc.java.protoc.message.BuilderGen and associated classes which work in the protoc plugin of McJava.

This PR introduces ImplementValidatingBuilder renderer which makes Builder classes implement ValidatingBuilder. Adding the code is done only if the Builder class does not implement the interface already. Such a case is possible when older McJava is used together with new Validation. Once McJava migrates to newer Validation, the check would be always false.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Jul 12, 2024
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review July 12, 2024 23:39
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.

Project coverage is 37.82%. Comparing base (7129197) to head (6a5ee6b).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #127      +/-   ##
============================================
- Coverage     38.32%   37.82%   -0.51%     
  Complexity      353      353              
============================================
  Files           125      127       +2     
  Lines          2338     2369      +31     
  Branches        197      200       +3     
============================================
  Hits            896      896              
- Misses         1380     1411      +31     
  Partials         62       62              

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov LGTM with a minor comment.

@alexander-yevsyukov alexander-yevsyukov merged commit f64f4c9 into master Jul 13, 2024
7 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the validating-builder-impl branch July 13, 2024 22:47
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