vBuild() method in message builders#409
Merged
dmdashenkov merged 51 commits intomasterfrom May 16, 2019
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #409 +/- ##
===========================================
+ Coverage 81.34% 82.1% +0.75%
- Complexity 2732 2769 +37
===========================================
Files 429 432 +3
Lines 10407 10451 +44
Branches 610 619 +9
===========================================
+ Hits 8466 8581 +115
+ Misses 1759 1684 -75
- Partials 182 186 +4 |
Contributor
Author
|
@alexander-yevsyukov, PTAL. |
vbuild() method in message buildersvBuild() method in message builders
alexander-yevsyukov
requested changes
May 15, 2019
Contributor
alexander-yevsyukov
left a comment
There was a problem hiding this comment.
Please address coverage as we discussed vocally.
Contributor
Author
|
@alexander-yevsyukov, PTAL again. |
alexander-yevsyukov
approved these changes
May 16, 2019
Contributor
alexander-yevsyukov
left a comment
There was a problem hiding this comment.
LGTM, with one small request.
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
Contributor
There was a problem hiding this comment.
Please document the package.
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.
This PR introduces the
io.spine.protobuf.ValidatingBuilderinterface—the substitution for the oldio.spine.validate.ValidatingBuilder. The new interface is implemented directly in the generated message builders.The correct way to use message builders now is:
vBuild()method in most cases; it builds the message and performs validation;buildPartial();build()is discoureged.The old
UseVBuildersErrorProne check is now disabled, as it is not recommended to useVBuilders anymore. Instead, we introduce theUseVBuildcheck, which makes sure users avoid callingbuild().