From bbfbbea08a33fca22845edaff8356ef46351136c Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 14:56:42 +0000 Subject: [PATCH 1/8] Bump version -> `2.0.0-SNAPSHOT.028` --- version.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.gradle.kts b/version.gradle.kts index a919f2f3e..7385a63ba 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -29,5 +29,5 @@ * * Do not rename this property, as it is also used in the integration tests via its name. */ -val coreJvmCompilerVersion by extra("2.0.0-SNAPSHOT.027") +val coreJvmCompilerVersion by extra("2.0.0-SNAPSHOT.028") val versionToPublish by extra(coreJvmCompilerVersion) From 5bc98f0024bcc348408f70de66af92df2d388128 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:32:25 +0000 Subject: [PATCH 2/8] Use specific interfaces of `EntityState` types Also: * Improve common test fixtures. --- .../core/jvm/entity/EntityPluginTestSetup.kt | 11 ++- .../jvm/entity/ImplementEntityStateSpec.kt | 81 +++++++++++++++++++ .../jvm/entity/column/AddColumnClassSpec.kt | 3 +- .../jvm/entity/field/AddFieldClassSpec.kt | 2 +- .../jvm/entity/query/QueryBuilderClassSpec.kt | 3 +- .../core/jvm/entity/query/QueryClassSpec.kt | 3 +- .../core/jvm/entity/query/QueryMethodSpec.kt | 3 +- .../proto/given/entities/organization.proto | 12 +++ .../core/jvm/entity/ImplementEntityState.kt | 33 +++++++- 9 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt index 1e3d9c313..062cc6cac 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt @@ -32,6 +32,7 @@ import io.spine.tools.core.jvm.gradle.settings.EntitySettings import io.spine.tools.core.jvm.settings.Entities import io.spine.tools.psi.java.method import java.nio.file.Path +import kotlin.io.path.Path import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows @@ -45,10 +46,18 @@ abstract class EntityPluginTestSetup : PluginTestSetup( ) { companion object { + /** * The path to the Java file generated for the `Department` entity state. */ - const val DEPARTMENT_JAVA = "io/spine/tools/core/jvm/entity/given/Department.java" + val departmentJava = "Department".java + + /** + * Obtains a path to a Java source file for the proto type with this name. + */ + val String.java get() = Path( + "io/spine/tools/core/jvm/entity/given/$this.java" + ) } override fun createSettings(projectDir: Path): Entities { diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt new file mode 100644 index 000000000..e33151b8b --- /dev/null +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt @@ -0,0 +1,81 @@ +/* + * Copyright 2025, TeamDev. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.tools.core.jvm.entity + +import io.kotest.matchers.string.shouldContain +import io.spine.base.AggregateState +import io.spine.base.EntityState +import io.spine.base.ProcessManagerState +import io.spine.base.ProjectionState +import io.spine.tools.code.Java +import io.spine.tools.compiler.render.SourceFile +import io.spine.tools.core.jvm.entity.EntityPluginTestSetup.Companion.java +import io.spine.tools.java.reference +import java.nio.file.Path +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.DisplayName +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.io.TempDir + +@DisplayName("`ImplementEntityState` action should") +class ImplementEntityStateSpec { + + private lateinit var sourceFile: SourceFile + + companion object : EntityPluginTestSetup() { + + @BeforeAll + @JvmStatic + fun setup(@TempDir projectDir: Path) { + runPipeline(projectDir) + } + } + + @Test + fun `use 'AggregateState' interface for 'AGGREGATE' kind`() { + sourceFile = file("Employee".java) + sourceFile.code().shouldContain(AggregateState::class.java.reference) + } + + @Test + fun `use 'ProjectionState' interface for 'PROJECTION' kind`() { + sourceFile = file("Organization".java) + sourceFile.code().shouldContain(ProjectionState::class.java.reference) + } + + @Test + fun `use 'ProcessManagerState' interface for 'PROCESS_MANAGER' kind`() { + sourceFile = file("Transition".java) + sourceFile.code().shouldContain(ProcessManagerState::class.java.reference) + } + + @Test + fun `use 'EntityState' interface for 'ENTITY' kind`() { + sourceFile = file("Blob".java) + sourceFile.code().shouldContain(EntityState::class.java.reference) + } +} diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/column/AddColumnClassSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/column/AddColumnClassSpec.kt index 2df3ae5e8..5052e5528 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/column/AddColumnClassSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/column/AddColumnClassSpec.kt @@ -40,7 +40,6 @@ import io.spine.tools.core.jvm.entity.assertHasMethod import io.spine.tools.java.reference import io.spine.tools.psi.java.locate import java.nio.file.Path -import kotlin.io.path.Path import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -60,7 +59,7 @@ internal class AddColumnClassSpec { @JvmStatic fun setup(@TempDir projectDir: Path) { runPipeline(projectDir) - val sourceFile = file(Path(DEPARTMENT_JAVA)) + val sourceFile = file(departmentJava) entityStateCode = sourceFile.code() psiFile = sourceFile.psi() as PsiJavaFile } diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/field/AddFieldClassSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/field/AddFieldClassSpec.kt index a12bebd0b..660c9cd18 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/field/AddFieldClassSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/field/AddFieldClassSpec.kt @@ -59,7 +59,7 @@ internal class AddFieldClassSpec { @JvmStatic fun setup(@TempDir projectDir: Path) { runPipeline(projectDir) - val sourceFile = file(Path(DEPARTMENT_JAVA)) + val sourceFile = file(departmentJava) entityStateCode = sourceFile.code() psiFile = sourceFile.psi() as PsiJavaFile } diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryBuilderClassSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryBuilderClassSpec.kt index bf129ad27..e4266dafe 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryBuilderClassSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryBuilderClassSpec.kt @@ -43,7 +43,6 @@ import io.spine.tools.psi.java.isPublic import io.spine.tools.psi.java.method import io.spine.tools.psi.java.topLevelClass import java.nio.file.Path -import kotlin.io.path.Path import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -61,7 +60,7 @@ internal class QueryBuilderClassSpec { @JvmStatic fun setup(@TempDir projectDir: Path) { runPipeline(projectDir) - val sourceFile = file(Path(DEPARTMENT_JAVA)) + val sourceFile = file(departmentJava) val psiFile = sourceFile.psi() as PsiJavaFile entityStateClass = psiFile.topLevelClass } diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryClassSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryClassSpec.kt index b643022de..dbfd76761 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryClassSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryClassSpec.kt @@ -36,7 +36,6 @@ import io.spine.tools.core.jvm.entity.EntityPluginTestSetup import io.spine.tools.kotlin.reference import io.spine.tools.psi.java.topLevelClass import java.nio.file.Path -import kotlin.io.path.Path import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -53,7 +52,7 @@ internal class QueryClassSpec { @JvmStatic fun setup(@TempDir projectDir: Path) { runPipeline(projectDir) - val sourceFile = file(Path(DEPARTMENT_JAVA)) + val sourceFile = file(departmentJava) val psiFile = sourceFile.psi() as PsiJavaFile entityStateClass = psiFile.topLevelClass } diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryMethodSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryMethodSpec.kt index 6770425dc..a8394ee35 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryMethodSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/QueryMethodSpec.kt @@ -35,7 +35,6 @@ import io.spine.tools.core.jvm.entity.EntityPluginTestSetup import io.spine.tools.psi.java.method import io.spine.tools.psi.java.topLevelClass import java.nio.file.Path -import kotlin.io.path.Path import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test @@ -53,7 +52,7 @@ internal class QueryMethodSpec { @JvmStatic fun setup(@TempDir projectDir: Path) { runPipeline(projectDir) - val sourceFile = file(Path(DEPARTMENT_JAVA)) + val sourceFile = file(departmentJava) psiFile = sourceFile.psi() as PsiJavaFile } } diff --git a/entity-tests/src/testFixtures/proto/given/entities/organization.proto b/entity-tests/src/testFixtures/proto/given/entities/organization.proto index 62e6f0cfd..1e05a3856 100644 --- a/entity-tests/src/testFixtures/proto/given/entities/organization.proto +++ b/entity-tests/src/testFixtures/proto/given/entities/organization.proto @@ -66,3 +66,15 @@ message Organization { string name = 2 [(required) = true, (column) = true]; repeated Department department = 3 [(required) = true]; } + +message Transition { + option (entity).kind = PROCESS_MANAGER; + EmployeeId id = 1; + DepartmentKey from = 2 [(required) = true]; + DepartmentKey to = 3 [(required) = true]; +} + +message Blob { + option (entity).kind = ENTITY; + int32 id = 1; +} diff --git a/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt b/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt index d3317dcf3..863376336 100644 --- a/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt +++ b/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt @@ -27,7 +27,15 @@ package io.spine.tools.core.jvm.entity import com.google.protobuf.Empty +import io.spine.base.AggregateState import io.spine.base.EntityState +import io.spine.base.ProcessManagerState +import io.spine.base.ProjectionState +import io.spine.option.EntityOption +import io.spine.option.EntityOption.Kind.AGGREGATE +import io.spine.option.EntityOption.Kind.ENTITY +import io.spine.option.EntityOption.Kind.PROCESS_MANAGER +import io.spine.option.EntityOption.Kind.PROJECTION import io.spine.tools.compiler.ast.MessageType import io.spine.tools.compiler.ast.firstField import io.spine.tools.compiler.context.CodegenContext @@ -37,11 +45,19 @@ import io.spine.tools.compiler.jvm.render.ImplementInterface import io.spine.tools.compiler.jvm.render.superInterface import io.spine.tools.compiler.render.SourceFile import io.spine.tools.code.Java +import io.spine.tools.compiler.ast.option +import io.spine.tools.compiler.ast.unpack import io.spine.tools.java.reference +import kotlin.reflect.KClass /** * Updates the Java code of a message type which qualifies as [EntityState] by - * making it implement this interface. + * making it implement this interface, or an interface derived from [EntityState]. + * + * The type of the selected interface is defined by the value of + * the [kind][EntityOption.Kind] property of [EntityOption]. + * + * ## API Note * * The class is public because its fully qualified name is used as a default * value in [EntitySettings][io.spine.tools.core.jvm.gradle.settings.EntitySettings]. @@ -69,11 +85,14 @@ public class ImplementEntityState( override fun doRender() { val idFieldType = type.firstField.javaType(typeSystem) + val option = type.option() + val entityOption = option.unpack() + val iface = entityStateInterface(entityOption) val action = ImplementInterface( type, file, superInterface { - name = EntityState::class.java.reference + name = iface.java.reference genericArgument.add(idFieldType) }, context @@ -81,3 +100,13 @@ public class ImplementEntityState( action.render() } } + +private fun entityStateInterface(option: EntityOption): KClass> { + return when (option.kind) { + AGGREGATE -> AggregateState::class + PROCESS_MANAGER -> ProcessManagerState::class + PROJECTION -> ProjectionState::class + ENTITY -> EntityState::class + else -> error("Unable to convert the entity kind: `${option.kind}`.") + } +} From b8f0a984930900031ba7b83eabdfaa418555c739 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:35:49 +0000 Subject: [PATCH 3/8] Update dependency reports --- dependencies.md | 80 ++++++++++++++++++++++++------------------------- pom.xml | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/dependencies.md b/dependencies.md index 970053db1..77d199182 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:core-jvm-annotation:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-annotation:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -1172,14 +1172,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-base:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-base:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -2359,14 +2359,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-comparable:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-comparable:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -3538,14 +3538,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-comparable-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-comparable-tests:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -4524,14 +4524,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-entity:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-entity:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -5703,14 +5703,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-entity-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-entity-tests:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -6689,14 +6689,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-gradle-plugins:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-gradle-plugins:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -7931,14 +7931,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-grpc:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-grpc:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -9077,14 +9077,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-ksp:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-ksp:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -10303,14 +10303,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-marker:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-marker:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -11490,14 +11490,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-marker-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-marker-tests:2.0.0-SNAPSHOT.028` ## Runtime ## Compile, tests, and tooling @@ -12059,14 +12059,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:53 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-message-group:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-message-group:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -13246,14 +13246,14 @@ This report was generated on **Thu Oct 30 20:59:53 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-message-group-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-message-group-tests:2.0.0-SNAPSHOT.028` ## Runtime ## Compile, tests, and tooling @@ -13807,14 +13807,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:53 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-plugin-bundle:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-plugin-bundle:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -14656,14 +14656,14 @@ This report was generated on **Thu Oct 30 20:59:53 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-routing:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-routing:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -15923,14 +15923,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-routing-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-routing-tests:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -16688,14 +16688,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:49 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-signal:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-signal:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -17875,14 +17875,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-signal-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-signal-tests:2.0.0-SNAPSHOT.028` ## Runtime ## Compile, tests, and tooling @@ -18444,14 +18444,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-uuid:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-uuid:2.0.0-SNAPSHOT.028` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -19631,14 +19631,14 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:core-jvm-uuid-tests:2.0.0-SNAPSHOT.027` +# Dependencies of `io.spine.tools:core-jvm-uuid-tests:2.0.0-SNAPSHOT.028` ## Runtime ## Compile, tests, and tooling @@ -20200,6 +20200,6 @@ This report was generated on **Thu Oct 30 20:59:54 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Oct 30 20:59:54 WET 2025** using +This report was generated on **Fri Oct 31 16:34:50 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file diff --git a/pom.xml b/pom.xml index 77e4a3a7b..f2b96f369 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.tools core-jvm-compiler -2.0.0-SNAPSHOT.027 +2.0.0-SNAPSHOT.028 2015 From b8606ef9ea27d96ef78834acab705f937e9a1674 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:45:28 +0000 Subject: [PATCH 4/8] Improve code layout --- .../io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt index 062cc6cac..1686524a5 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt @@ -55,9 +55,8 @@ abstract class EntityPluginTestSetup : PluginTestSetup( /** * Obtains a path to a Java source file for the proto type with this name. */ - val String.java get() = Path( - "io/spine/tools/core/jvm/entity/given/$this.java" - ) + val String.java: Path + get() = Path("io/spine/tools/core/jvm/entity/given/$this.java") } override fun createSettings(projectDir: Path): Entities { From f9a518091d09b6b34ef485e6f83159333016b5a5 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:47:03 +0000 Subject: [PATCH 5/8] Make `Blob` more meaningful --- .../src/testFixtures/proto/given/entities/organization.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/entity-tests/src/testFixtures/proto/given/entities/organization.proto b/entity-tests/src/testFixtures/proto/given/entities/organization.proto index 1e05a3856..bf8d0b31f 100644 --- a/entity-tests/src/testFixtures/proto/given/entities/organization.proto +++ b/entity-tests/src/testFixtures/proto/given/entities/organization.proto @@ -77,4 +77,5 @@ message Transition { message Blob { option (entity).kind = ENTITY; int32 id = 1; + bytes data = 2; } From e2fa0b7a82cd51829e76b1a1db3c030b1535279a Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:49:02 +0000 Subject: [PATCH 6/8] Update build time --- dependencies.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/dependencies.md b/dependencies.md index 77d199182..ffd5176ef 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1172,7 +1172,7 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -2359,7 +2359,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -3538,7 +3538,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -4524,7 +4524,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -5703,7 +5703,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -6689,7 +6689,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -7931,7 +7931,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -9077,7 +9077,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -10303,7 +10303,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -11490,7 +11490,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -12059,7 +12059,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -13246,7 +13246,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -13807,7 +13807,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -14656,7 +14656,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -15923,7 +15923,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -16688,7 +16688,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:49 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -17875,7 +17875,7 @@ This report was generated on **Fri Oct 31 16:34:49 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -18444,7 +18444,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -19631,7 +19631,7 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -20200,6 +20200,6 @@ This report was generated on **Fri Oct 31 16:34:50 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Oct 31 16:34:50 WET 2025** using +This report was generated on **Fri Oct 31 16:48:47 WET 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file From cbc0a5109adca8ea881d20b280839e8aa8c4fcee Mon Sep 17 00:00:00 2001 From: Alexander Yevsyukov Date: Fri, 31 Oct 2025 18:50:24 +0200 Subject: [PATCH 7/8] Improve error message Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../io/spine/tools/core/jvm/entity/ImplementEntityState.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt b/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt index 863376336..b2c3cb9f9 100644 --- a/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt +++ b/entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt @@ -107,6 +107,6 @@ private fun entityStateInterface(option: EntityOption): KClass ProcessManagerState::class PROJECTION -> ProjectionState::class ENTITY -> EntityState::class - else -> error("Unable to convert the entity kind: `${option.kind}`.") + else -> error("Unsupported entity kind: `${option.kind}`.") } } From 9442a9fa9e4e09f23ecfd750a620d275c2a348f8 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 31 Oct 2025 16:55:40 +0000 Subject: [PATCH 8/8] Use local `val` --- .../tools/core/jvm/entity/ImplementEntityStateSpec.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt index e33151b8b..7599d2383 100644 --- a/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt +++ b/entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt @@ -44,8 +44,6 @@ import org.junit.jupiter.api.io.TempDir @DisplayName("`ImplementEntityState` action should") class ImplementEntityStateSpec { - private lateinit var sourceFile: SourceFile - companion object : EntityPluginTestSetup() { @BeforeAll @@ -57,25 +55,25 @@ class ImplementEntityStateSpec { @Test fun `use 'AggregateState' interface for 'AGGREGATE' kind`() { - sourceFile = file("Employee".java) + val sourceFile = file("Employee".java) sourceFile.code().shouldContain(AggregateState::class.java.reference) } @Test fun `use 'ProjectionState' interface for 'PROJECTION' kind`() { - sourceFile = file("Organization".java) + val sourceFile = file("Organization".java) sourceFile.code().shouldContain(ProjectionState::class.java.reference) } @Test fun `use 'ProcessManagerState' interface for 'PROCESS_MANAGER' kind`() { - sourceFile = file("Transition".java) + val sourceFile = file("Transition".java) sourceFile.code().shouldContain(ProcessManagerState::class.java.reference) } @Test fun `use 'EntityState' interface for 'ENTITY' kind`() { - sourceFile = file("Blob".java) + val sourceFile = file("Blob".java) sourceFile.code().shouldContain(EntityState::class.java.reference) } }