Skip to content
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

Empty context #1185

Merged
merged 13 commits into from
Oct 31, 2019
6 changes: 5 additions & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ jobs:
run: git submodule update --init --recursive

- name: Run tests with Gradle
run: gradlew.bat build
run: |
echo Current directory is:
cd
gradlew.bat build
shell: cmd
44 changes: 44 additions & 0 deletions core/src/main/proto/spine/core/empty_context.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright 2019, TeamDev. All rights reserved.
*
* 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.
*/
syntax = "proto3";

package spine.core;

import "spine/options.proto";

option (type_url_prefix) = "type.spine.io";
option java_package = "io.spine.core";
option java_multiple_files = true;
option java_outer_classname = "EmptyContextProto";

// An empty context is used in combination with message types that do not have a context
// to conform APIs that require both message and its context.
//
// Handlers of command and message may accept both command and event message and their context.
// Updated entity states when propagated to subscribers do not have a context.
//
// The primary purpose of this type is to serve as a placeholder in Java code where
// `io.spine.core.MessageContext` is needed in combination with message types (like entity sate)
// which does not have a context. In other words, what `google.protobuf.Empty` is for message,
// this type is for `io.spine.base.MessageContext`.
//
message EmptyContext {
option (is).java_type = "io.spine.base.MessageContext";
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
492 changes: 234 additions & 258 deletions license-report.md

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ all modules and does not describe the project structure per-subproject.

<groupId>io.spine</groupId>
<artifactId>spine-core-java</artifactId>
<version>1.1.11</version>
<version>1.1.12</version>

<inceptionYear>2015</inceptionYear>

Expand Down Expand Up @@ -52,25 +52,25 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>1.22.0</version>
<version>1.24.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.22.0</version>
<version>1.24.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.22.0</version>
<version>1.24.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.spine</groupId>
<artifactId>spine-base</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -82,13 +82,13 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-model-compiler</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-plugin-base</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -118,13 +118,13 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.22.0</version>
<version>1.24.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.spine</groupId>
<artifactId>spine-testlib</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -136,13 +136,13 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-mute-logging</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-plugin-testlib</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -194,22 +194,22 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
<version>3.9.0</version>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>protoc-gen-grpc-java</artifactId>
<version>1.22.0</version>
<version>1.24.1</version>
</dependency>
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-javadoc-filter</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-protoc-plugin</artifactId>
<version>1.1.5</version>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
import static io.spine.base.Time.currentTime;
import static io.spine.grpc.StreamObservers.memoizingObserver;
import static io.spine.protobuf.Durations2.seconds;
import static io.spine.protobuf.Messages.isDefault;
import static io.spine.server.event.given.EventStoreTestEnv.assertDone;
import static io.spine.server.event.given.EventStoreTestEnv.projectCreated;
import static io.spine.server.event.given.EventStoreTestEnv.taskAdded;
import static io.spine.testing.core.given.GivenEnrichment.withOneAttribute;
import static io.spine.validate.Validate.isDefault;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down
4 changes: 2 additions & 2 deletions version.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
* as we want to manage the versions in a single source.
*/

final def spineVersion = '1.1.11'
final def spineVersion = '1.1.12'

ext {
// The version of the modules in this project.
versionToPublish = spineVersion

// Depend on `base` for the general definitions and a model compiler.
spineBaseVersion = '1.1.7'
spineBaseVersion = '1.1.9'

// Depend on `time` for `ZoneId`, `ZoneOffset` and other date/time types and utilities.
spineTimeVersion = '1.1.2'
Expand Down