-
Notifications
You must be signed in to change notification settings - Fork 4
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
vBuild()
method in message builders
#409
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 |
@alexander-yevsyukov, PTAL. |
vbuild()
method in message buildersvBuild()
method in message builders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address coverage as we discussed vocally.
@alexander-yevsyukov, PTAL again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document the package.
This PR introduces the
io.spine.protobuf.ValidatingBuilder
interface—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
UseVBuilders
ErrorProne check is now disabled, as it is not recommended to useVBuilder
s anymore. Instead, we introduce theUseVBuild
check, which makes sure users avoid callingbuild()
.