Generated event routing, updated dependencies#181
Merged
alexander-yevsyukov merged 97 commits intomasterfrom Feb 18, 2025
Merged
Generated event routing, updated dependencies#181alexander-yevsyukov merged 97 commits intomasterfrom
alexander-yevsyukov merged 97 commits intomasterfrom
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.
armiol
approved these changes
Feb 17, 2025
Contributor
armiol
left a comment
There was a problem hiding this comment.
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> : |
| import io.spine.server.entity.Entity | ||
| import io.spine.server.route.EventRouting | ||
|
|
||
| public interface EventRoutingSetup<I : Any> : |
| import io.spine.server.entity.Entity | ||
| import io.spine.server.route.MessageRouting | ||
|
|
||
| public interface RoutingSetup< |
| import io.spine.server.entity.Entity | ||
| import io.spine.server.route.StateUpdateRouting | ||
|
|
||
| public interface StateRoutingSetup<I : Any> : |
| import io.spine.base.CommandMessage | ||
| import io.spine.core.CommandContext | ||
|
|
||
| internal class CommandRouteSignature( |
|
|
||
| import com.squareup.kotlinpoet.ksp.toClassName | ||
|
|
||
| internal class CommandRouteVisitor( |
| return (!wrongNumber).toErrorCount() | ||
| } | ||
|
|
||
| internal fun KSFunctionDeclaration.declaringClass(environment: Environment): EntityClass? { |
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
Comment on lines
114
to
117
| Compilation.error( | ||
| protoSource, option.span.startLine, option.span.startColumn, | ||
| "Unable to find a field with the path `$path` in the type `${type.qualifiedName}`." | ||
| ) |
Contributor
There was a problem hiding this comment.
There's already an overload for Span and lambda message.
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:
mc-java-routingmodule 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-smokebecause 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.