-
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
BuiltMessage
and Kotlin extensions
#604
Conversation
It's the same way as generated code does.
…e-message # Conflicts: # config
I see the integration tests failing, I'm on the fix. |
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.
@alexander-yevsyukov LGTM in general. Please see my comments.
tools/protoc-plugin/src/main/java/io/spine/tools/protoc/plugin/message/ExistingInterface.java
Show resolved
Hide resolved
tools/protoc-plugin/src/main/java/io/spine/tools/protoc/plugin/message/MixInSpec.java
Show resolved
Hide resolved
tools/protoc-plugin/src/main/java/io/spine/tools/protoc/plugin/message/ValidationGen.java
Show resolved
Hide resolved
tools/protoc-plugin/src/main/java/io/spine/tools/protoc/plugin/message/ValidationGen.java
Outdated
Show resolved
Hide resolved
tools/tool-base/src/test/java/io/spine/tools/protoc/FilePatternsTest.java
Outdated
Show resolved
Hide resolved
tools/tool-base/src/test/java/io/spine/tools/protoc/MessageSelectorFactoryTest.java
Outdated
Show resolved
Hide resolved
tools/tool-base/src/test/java/io/spine/tools/protoc/MethodsTest.java
Outdated
Show resolved
Hide resolved
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 see my comments.
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.
@alexander-yevsyukov LGTM with a single comment to address.
This PR introduces
BuiltMessage
interface which binds a builder type with the message type.The binding is used in Kotlin extension declared (in the
io/spine/base/extensions.kt
file) as shown below:This binding is going to be used in other generated Kotlin extensions in the following PRs.
Changes to the existing types and hierarchies
ValidatingBuilder
interface moved to theio.spine.base
package.RejectionType
moved to theio.spine.base
package (fromio.spine.type
).KnownMessage
moved to theio.spine.type
package (fromio.spine.base
).SerializableMessage
moved toio.spine.type
(fromio.spine.base
).EntityState
are now are based onBuiltMessage
and the code generation was adjusted accordingly.ThrowableMessage
was renamed toRejectionThrowable
to avoid the confusion. Now it's clear that a rejection has two incarnations:RejectionMessage
andRejectionThrowable
.UuidValue
interface lost the unused generic parameter<I>
.Other notable changes introduced by this PR:
smoke-tests
were renamed totests
and pushed to the root project directory.MessageType.isSignal()
method was introduced.io.spine.environment
.xxx-api
were merged into correspondingxxx-base
modules (e.g.spine-tools-api
became a part ofspine-tool-base
).Generated
prefix (e.g.GeneratedNestedClass
becameNestedClass
).XxxGenerator
were renamed to beXxxGen
.