Skip to content

Commit

Permalink
Merge pull request #1560 from SpineEventEngine/propagate-error
Browse files Browse the repository at this point in the history
Propagate `Error` thrown by a receptor
  • Loading branch information
alexander-yevsyukov authored Dec 13, 2024
2 parents a3ce28e + e12d77e commit 2692136
Show file tree
Hide file tree
Showing 45 changed files with 810 additions and 398 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/DependencyResolution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import io.spine.dependency.lib.Okio
import io.spine.dependency.lib.Plexus
import io.spine.dependency.lib.Protobuf
import io.spine.dependency.lib.Slf4J
import io.spine.dependency.local.Base
import io.spine.dependency.local.Spine
import io.spine.dependency.test.Hamcrest
import io.spine.dependency.test.JUnit
Expand Down Expand Up @@ -186,7 +187,7 @@ fun ModuleDependency.excludeSpineBase() {
fun Project.forceSpineBase() {
configurations.all {
resolutionStrategy {
force(Spine.base)
force(Base.lib)
}
}
}
Expand All @@ -200,7 +201,7 @@ fun Project.forceBaseInProtoTasks() {
configurations.configureEach {
if (name.lowercased().contains("proto")) {
resolutionStrategy {
force(Spine.baseForBuildScript)
force(Base.libForBuildScript)
}
}
}
Expand Down
15 changes: 9 additions & 6 deletions buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,20 @@ package io.spine.dependency.build
object ErrorProne {
// https://github.com/google/error-prone
private const val version = "2.23.0"

const val group = "com.google.errorprone"

// https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts
private const val javacPluginVersion = "9+181-r4173-1"

val annotations = listOf(
"com.google.errorprone:error_prone_annotations:$version",
"com.google.errorprone:error_prone_type_annotations:$version"
"$group:error_prone_annotations:$version",
"$group:error_prone_type_annotations:$version"
)
const val core = "com.google.errorprone:error_prone_core:$version"
const val checkApi = "com.google.errorprone:error_prone_check_api:$version"
const val testHelpers = "com.google.errorprone:error_prone_test_helpers:$version"
const val javacPlugin = "com.google.errorprone:javac:$javacPluginVersion"
const val core = "$group:error_prone_core:$version"
const val checkApi = "$group:error_prone_check_api:$version"
const val testHelpers = "$group:error_prone_test_helpers:$version"
const val javacPlugin = "$group:javac:$javacPluginVersion"

// https://github.com/tbroyer/gradle-errorprone-plugin/releases
object GradlePlugin {
Expand Down
11 changes: 6 additions & 5 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ package io.spine.dependency.lib
@Suppress("unused", "ConstPropertyName")
object Asm {
private const val version = "9.6"
const val lib = "org.ow2.asm:asm:$version"
const val group = "org.ow2.asm"
const val lib = "$group:asm:$version"

// We use the following artifacts only to force the versions
// of the dependencies which are transitive for us.
//
const val tree = "org.ow2.asm:asm-tree:$version"
const val analysis = "org.ow2.asm:asm-analysis:$version"
const val util = "org.ow2.asm:asm-util:$version"
const val commons = "org.ow2.asm:asm-commons:$version"
const val tree = "$group:asm-tree:$version"
const val analysis = "$group:asm-analysis:$version"
const val util = "$group:asm-util:$version"
const val commons = "$group:asm-commons:$version"
}
25 changes: 13 additions & 12 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,21 @@ package io.spine.dependency.lib
object Grpc {
@Suppress("MemberVisibilityCanBePrivate")
const val version = "1.59.0"
const val api = "io.grpc:grpc-api:$version"
const val auth = "io.grpc:grpc-auth:$version"
const val core = "io.grpc:grpc-core:$version"
const val context = "io.grpc:grpc-context:$version"
const val inProcess = "io.grpc:grpc-inprocess:$version"
const val stub = "io.grpc:grpc-stub:$version"
const val okHttp = "io.grpc:grpc-okhttp:$version"
const val protobuf = "io.grpc:grpc-protobuf:$version"
const val protobufLite = "io.grpc:grpc-protobuf-lite:$version"
const val netty = "io.grpc:grpc-netty:$version"
const val nettyShaded = "io.grpc:grpc-netty-shaded:$version"
const val group = "io.grpc"
const val api = "$group:grpc-api:$version"
const val auth = "$group:grpc-auth:$version"
const val core = "$group:grpc-core:$version"
const val context = "$group:grpc-context:$version"
const val inProcess = "$group:grpc-inprocess:$version"
const val stub = "$group:grpc-stub:$version"
const val okHttp = "$group:grpc-okhttp:$version"
const val protobuf = "$group:grpc-protobuf:$version"
const val protobufLite = "$group:grpc-protobuf-lite:$version"
const val netty = "$group:grpc-netty:$version"
const val nettyShaded = "$group:grpc-netty-shaded:$version"

object ProtocPlugin {
const val id = "grpc"
const val artifact = "io.grpc:protoc-gen-grpc-java:$version"
const val artifact = "$group:protoc-gen-grpc-java:$version"
}
}
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ package io.spine.dependency.lib
@Suppress("unused", "ConstPropertyName")
object Guava {
private const val version = "32.1.3-jre"
const val lib = "com.google.guava:guava:$version"
const val testLib = "com.google.guava:guava-testlib:$version"
const val group = "com.google.guava"
const val lib = "$group:guava:$version"
const val testLib = "$group:guava-testlib:$version"
}
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ package io.spine.dependency.lib
@Suppress("unused", "ConstPropertyName")
object JavaPoet {
private const val version = "1.13.0"
const val lib = "com.squareup:javapoet:$version"
const val group = "com.squareup"
const val artifact = "javapoet"
const val module = "$group:$artifact"
const val lib = "$module:$version"
}
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ package io.spine.dependency.lib
object JavaX {
// This artifact, which used to be a part of J2EE, moved under the Eclipse EE4J project.
// https://github.com/eclipse-ee4j/common-annotations-api
const val annotations = "javax.annotation:javax.annotation-api:1.3.2"
const val annotationGroup = "javax.annotation"
const val annotations = "$annotationGroup:javax.annotation-api:1.3.2"

const val servletApi = "javax.servlet:javax.servlet-api:3.1.0"
}
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinX.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ object KotlinX {
object Coroutines {

// https://github.com/Kotlin/kotlinx.coroutines
const val version = "1.7.3"
const val version = "1.9.0"
const val core = "$group:kotlinx-coroutines-core:$version"
const val jdk8 = "$group:kotlinx-coroutines-jdk8:$version"
const val test = "$group:kotlinx-coroutines-test:$version"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package io.spine.dependency.lib
"ConstPropertyName" /* https://bit.ly/kotlin-prop-names */
)
object Protobuf {
private const val group = "com.google.protobuf"
const val group = "com.google.protobuf"
const val version = "3.25.1"

/**
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ object Roaster {
*/
private const val version = "2.28.0.Final"

const val api = "org.jboss.forge.roaster:roaster-api:$version"
const val jdt = "org.jboss.forge.roaster:roaster-jdt:$version"
const val group = "org.jboss.forge.roaster"
const val api = "$group:roaster-api:$version"
const val jdt = "$group:roaster-jdt:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,23 @@ object ArtifactVersion {
*
* @see <a href="https://github.com/SpineEventEngine/base">spine-base</a>
*/
const val base = "2.0.0-SNAPSHOT.220"
const val baseForBuildScript = "2.0.0-SNAPSHOT.220"
@Deprecated(message = "Please use `Base.version`.", ReplaceWith("Base.version"))
const val base = Base.version

@Suppress("unused")
@Deprecated(
message = "Please use `Base.versionForBuildScript`.",
ReplaceWith("Base.versionForBuildScript")
)
const val baseForBuildScript = Base.versionForBuildScript

/**
* The version of [Spine.reflect].
*
* @see <a href="https://github.com/SpineEventEngine/reflect">spine-reflect</a>
*/
const val reflect = "2.0.0-SNAPSHOT.190"
@Deprecated(message = "Please use `Reflect.version`.", ReplaceWith("Reflect.version"))
const val reflect = Reflect.version

/**
* The version of [Logging].
Expand All @@ -58,7 +66,8 @@ object ArtifactVersion {
*
* @see <a href="https://github.com/SpineEventEngine/testlib">spine-testlib</a>
*/
const val testlib = "2.0.0-SNAPSHOT.184"
@Deprecated(message = "Please use `TestLib.version`.", ReplaceWith("TestLib.version"))
const val testlib = TestLib.version

/**
* The version of `core-java`.
Expand All @@ -71,41 +80,51 @@ object ArtifactVersion {
*
* @see <a href="https://github.com/SpineEventEngine/model-compiler">spine-model-compiler</a>
*/
const val mc = "2.0.0-SNAPSHOT.133"
@Deprecated(
message = "Please use `ModelCompiler.version` instead.",
ReplaceWith("ModelCompiler.version")
)
const val mc = ModelCompiler.version

/**
* The version of [Spine.baseTypes].
*
* @see <a href="https://github.com/SpineEventEngine/base-types">spine-base-types</a>
*/
const val baseTypes = "2.0.0-SNAPSHOT.126"
@Deprecated(message = "Please use `BaseTypes.version`.", ReplaceWith("BaseTypes.version"))
const val baseTypes = BaseTypes.version

/**
* The version of [Spine.time].
*
* @see <a href="https://github.com/SpineEventEngine/time">spine-time</a>
*/
const val time = "2.0.0-SNAPSHOT.135"
@Deprecated(message = "Please use `Time.version`.", ReplaceWith("Time.version"))
const val time = Time.version

/**
* The version of [Spine.change].
*
* @see <a href="https://github.com/SpineEventEngine/change">spine-change</a>
*/
const val change = "2.0.0-SNAPSHOT.118"
@Deprecated(message = "Please use `Change.version`.", ReplaceWith("Change.version"))
const val change = Change.version

/**
* The version of [Spine.text].
*
* @see <a href="https://github.com/SpineEventEngine/text">spine-text</a>
*/
const val text = "2.0.0-SNAPSHOT.6"
@Deprecated(message = "Please use `Text.version`.", ReplaceWith("Text.version"))
const val text = Text.version

/**
* The version of [Spine.toolBase].
*
* @see <a href="https://github.com/SpineEventEngine/tool-base">spine-tool-base</a>
*/
@Suppress("unused")
@Deprecated(message = "Please use `ToolBase.version`.", ReplaceWith("ToolBase.version"))
const val toolBase = ToolBase.version

/**
Expand Down
42 changes: 42 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2024, 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.dependency.local

/**
* Spine Base module.
*
* @see <a href="https://github.com/SpineEventEngine/base">spine-base</a>
*/
@Suppress("ConstPropertyName")
object Base {
const val version = "2.0.0-SNAPSHOT.231"
const val versionForBuildScript = "2.0.0-SNAPSHOT.231"
const val group = Spine.group
const val artifact = "spine-base"
const val lib = "$group:$artifact:$version"
const val libForBuildScript = "$group:$artifact:$versionForBuildScript"
}
40 changes: 40 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2024, 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.dependency.local

/**
* Spine Base module.
*
* @see <a href="https://github.com/SpineEventEngine/base-types">spine-base-types</a>
*/
@Suppress("ConstPropertyName")
object BaseTypes {
const val version = "2.0.0-SNAPSHOT.126"
const val group = Spine.group
const val artifact = "spine-base-types"
const val lib = "$group:$artifact:$version"
}
40 changes: 40 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2024, 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.dependency.local

/**
* Spine Reflect library.
*
* @see <a href="https://github.com/SpineEventEngine/change">spine-change</a>
*/
@Suppress("ConstPropertyName")
object Change {
const val version = "2.0.0-SNAPSHOT.118"
const val group = Spine.group
const val artifact = "spine-change"
const val lib = "$group:$artifact:$version"
}
Loading

0 comments on commit 2692136

Please sign in to comment.