-
Notifications
You must be signed in to change notification settings - Fork 2
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
Generated event routing, updated dependencies #181
Conversation
... because the module no longer belongs to the project.
Also: * Add `KotlinPoet` dependency object.
Also: * Extract obtaining classpath element by a class.
It's not needed because they are called from generated Kotlin code
This is not needed because the Kotlin functions will be invoked from generated Kotlin code.
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.
As discussed, the missing documentation will be added in the consequent PRs. Now, the priority is to push the new API, and expose it for other libraries, such as Validation.
LGTM.
@yevhenii-nadtochii FYI.
import io.spine.server.entity.Entity | ||
import io.spine.server.route.CommandRouting | ||
|
||
public interface CommandRoutingSetup<I : Any> : |
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.
import io.spine.server.entity.Entity | ||
import io.spine.server.route.EventRouting | ||
|
||
public interface EventRoutingSetup<I : Any> : |
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.
Same as above.
import io.spine.server.entity.Entity | ||
import io.spine.server.route.MessageRouting | ||
|
||
public interface RoutingSetup< |
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.
And here.
import io.spine.server.entity.Entity | ||
import io.spine.server.route.StateUpdateRouting | ||
|
||
public interface StateRoutingSetup<I : Any> : |
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.
And here.
import io.spine.base.CommandMessage | ||
import io.spine.core.CommandContext | ||
|
||
internal class CommandRouteSignature( |
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 as well.
|
||
import com.squareup.kotlinpoet.ksp.toClassName | ||
|
||
internal class CommandRouteVisitor( |
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.
And this one.
return (!wrongNumber).toErrorCount() | ||
} | ||
|
||
internal fun KSFunctionDeclaration.declaringClass(environment: Environment): EntityClass? { |
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.
And this one, too.
buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt
Outdated
Show resolved
Hide resolved
mc-java-comparable/src/main/kotlin/io/spine/tools/mc/java/comparable/action/AddComparator.kt
Outdated
Show resolved
Hide resolved
Compilation.error( | ||
protoSource, option.span.startLine, option.span.startColumn, | ||
"Unable to find a field with the path `$path` in the type `${type.qualifiedName}`." | ||
) |
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.
There's already an overload for Span
and lambda message.
Co-authored-by: Yevhenii Nadtochii <[email protected]>
This PR:
mc-java-routing
module which generates Kotlin routing setup classes for tuningEventRouting
.Code generation for other routing schemas will be implemented in the following PRs.
This PR is half-baked to allow current works in Validation to use McJava compatible with the latest versions of ProtoData and CoreJava.
This PR also temporarily disables the integration test project
validation-smoke
because of API incompatibility introduced by recent CoreJava. The test will be enabled back after Validation is migrated to the latest version of CoreJava and ProtoData.