From 7003a434ee43ad59fb442aef6065c5b9ecb9c877 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 19:15:30 +0300 Subject: [PATCH 1/6] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index c06340dd72..cb8f3e1700 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit c06340dd7221118a3caa2da93a02fbbafcbab1a0 +Subproject commit cb8f3e170024a9972d0b89cfa25044d83bfb9b3e From d6a753dfae6d23ddf3fe04421efeeaf6735f75ba Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 19:16:34 +0300 Subject: [PATCH 2/6] Update option docs --- base/src/main/proto/spine/options.proto | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/base/src/main/proto/spine/options.proto b/base/src/main/proto/spine/options.proto index 4b29b3466f..fcb8fefc0a 100644 --- a/base/src/main/proto/spine/options.proto +++ b/base/src/main/proto/spine/options.proto @@ -432,7 +432,7 @@ extend google.protobuf.MessageOptions { // In the example above, `CreateProject` message is a `ProjectCommand`. // // To specify a characteristic for every message in a `.proto` file, use `(every_is)` file - // option. If both `(is)` and `(every_is)` options are found, `(is)` value is taken. + // option. If both `(is)` and `(every_is)` options are found, both are applied. // // When targeting Java, specify the name of a Java interface to be implemented by this // message via `(is).java_type`. @@ -492,7 +492,7 @@ extend google.protobuf.FileOptions { // messages are `ProjectCommand`-s. // // To specify a characteristic for a single message, use `(is)` message option. If both `(is)` - // and `(every_is)` options are found, `(is)` value is taken. + // and `(every_is)` options are found, both are applied. // // When targeting Java, specify the name of a Java interface to be implemented by these // message types via `(every_is).java_type`. @@ -825,5 +825,8 @@ message IsOption { // name. When a simple name is set in the option, the package of the interface matches the // package of the message class. // + // If both `(is)` and `(every_is)` options specify a Java interface, the message class + // implements both interfaces. + // string java_type = 2; } From 123db0b0326d7ef303054a488c565c47a0b0a2c5 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 19:18:00 +0300 Subject: [PATCH 3/6] Update README --- tools/protoc-plugin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/protoc-plugin/README.md b/tools/protoc-plugin/README.md index bc15f18b79..128b5a9cc3 100644 --- a/tools/protoc-plugin/README.md +++ b/tools/protoc-plugin/README.md @@ -51,7 +51,7 @@ message Hamster { } ``` -If both `(is)` and `(every_is)` options are found, `(is)` value is taken. +If both `(is)` and `(every_is)` options are found, both are applied. Also, both `(is)` and `(every_is)` options support shorter syntax with no explicit package declaration. In this case, the package of the current file (either `java_package` or Protobuf From f7cd5f24ad64e6fc48123d3bfd83948d813fcd24 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 19:29:42 +0300 Subject: [PATCH 4/6] Apply `(every_is)` option even if `(is)` is present --- .../protoc/iface/InterfaceGenerator.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tools/protoc-plugin/src/main/java/io/spine/tools/protoc/iface/InterfaceGenerator.java b/tools/protoc-plugin/src/main/java/io/spine/tools/protoc/iface/InterfaceGenerator.java index 901c53c55b..a7d5828fbe 100644 --- a/tools/protoc-plugin/src/main/java/io/spine/tools/protoc/iface/InterfaceGenerator.java +++ b/tools/protoc-plugin/src/main/java/io/spine/tools/protoc/iface/InterfaceGenerator.java @@ -41,6 +41,9 @@ * The {@link CodeGenerator} implementation generating the specific interfaces implemented by * some message types. * + *

This generator processes interfaces obtained from {@code (is)} and {@code (every_is)} options + * as well as interfaces defined for {@linkplain CodeGenerationTask file patterns}. + * *

The generator produces two types of {@link File CodeGeneratorResponse.File} instances * representing: *

    @@ -101,18 +104,13 @@ protected Collection generate(Type type) { } private ImmutableList processMessageType(MessageType type) { - ImmutableList.Builder result = ImmutableList.builder(); - ImmutableList matched = codeGenerationTasks.generateFor(type); - result.addAll(matched); - Collection fromMsgOption = MessageAndInterface.scanMsgOption(type); - result.addAll(fromMsgOption); - - if (fromMsgOption.isEmpty()) { - Collection fromFileOption = MessageAndInterface.scanFileOption(type); - result.addAll(fromFileOption); - } - return result.build(); + Collection fromFileOption = MessageAndInterface.scanFileOption(type); + return ImmutableList.builder() + .addAll(matched) + .addAll(fromMsgOption) + .addAll(fromFileOption) + .build(); } } From 0109208714f2ff1acff5529fee556d5f1199b8e6 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 19:50:55 +0300 Subject: [PATCH 5/6] Update a test --- .../src/test/java/io/spine/tools/protoc/ProtocPluginTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/smoke-tests/model-compiler-tests/src/test/java/io/spine/tools/protoc/ProtocPluginTest.java b/tools/smoke-tests/model-compiler-tests/src/test/java/io/spine/tools/protoc/ProtocPluginTest.java index 19fae8cfb7..ba5785631f 100644 --- a/tools/smoke-tests/model-compiler-tests/src/test/java/io/spine/tools/protoc/ProtocPluginTest.java +++ b/tools/smoke-tests/model-compiler-tests/src/test/java/io/spine/tools/protoc/ProtocPluginTest.java @@ -93,12 +93,12 @@ void implementInterfaceInGeneratedMessagesWithIsOption() { } @Test - @DisplayName("use `IS` in priority to `EVERY IS`") + @DisplayName("use `IS` and `EVERY IS` together") void useIsInPriorityToEveryIs() { assertThat(PIUserCreated.getDefaultInstance()).isInstanceOf(PIUserEvent.class); assertThat(PIUserNameUpdated.getDefaultInstance()).isInstanceOf(PIUserEvent.class); - assertThat(UserName.getDefaultInstance()).isNotInstanceOf(PIUserEvent.class); + assertThat(UserName.getDefaultInstance()).isInstanceOf(PIUserEvent.class); assertThat(UserName.getDefaultInstance()).isInstanceOf(UserInfo.class); } From 81a8a4809c155244d32b7d1b301f7269e71e7205 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Mon, 27 Apr 2020 20:45:58 +0300 Subject: [PATCH 6/6] Upate version --- license-report.md | 60 +++++++++++++++++++++++------------------------ pom.xml | 4 ++-- version.gradle | 2 +- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/license-report.md b/license-report.md index 7ee5a9a0ad..acd9b28a8c 100644 --- a/license-report.md +++ b/license-report.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-base:1.5.10` +# Dependencies of `io.spine:spine-base:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -328,12 +328,12 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:32 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:27 EEST 2020** 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:spine-errorprone-checks:1.5.10` +# Dependencies of `io.spine.tools:spine-errorprone-checks:1.5.11` ## Runtime 1. **Group:** com.github.ben-manes.caffeine **Name:** caffeine **Version:** 2.7.0 @@ -773,12 +773,12 @@ This report was generated on **Mon Apr 27 17:38:32 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:33 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:28 EEST 2020** 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:spine-javadoc-filter:1.5.10` +# Dependencies of `io.spine.tools:spine-javadoc-filter:1.5.11` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1156,12 +1156,12 @@ This report was generated on **Mon Apr 27 17:38:33 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:34 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:29 EEST 2020** 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:spine-javadoc-prettifier:1.5.10` +# Dependencies of `io.spine.tools:spine-javadoc-prettifier:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -1521,12 +1521,12 @@ This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:34 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:29 EEST 2020** 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:spine-model-compiler:1.5.10` +# Dependencies of `io.spine.tools:spine-model-compiler:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -1902,12 +1902,12 @@ This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:35 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:30 EEST 2020** 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:spine-mute-logging:1.5.10` +# Dependencies of `io.spine.tools:spine-mute-logging:1.5.11` ## Runtime 1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3 @@ -2281,12 +2281,12 @@ This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:35 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:30 EEST 2020** 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:spine-plugin-base:1.5.10` +# Dependencies of `io.spine.tools:spine-plugin-base:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -2646,12 +2646,12 @@ This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:36 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:31 EEST 2020** 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:spine-plugin-testlib:1.5.10` +# Dependencies of `io.spine.tools:spine-plugin-testlib:1.5.11` ## Runtime 1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3 @@ -3065,12 +3065,12 @@ This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:36 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:31 EEST 2020** 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:spine-proto-dart-plugin:1.5.10` +# Dependencies of `io.spine.tools:spine-proto-dart-plugin:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -3430,12 +3430,12 @@ This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:37 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:32 EEST 2020** 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:spine-proto-js-plugin:1.5.10` +# Dependencies of `io.spine.tools:spine-proto-js-plugin:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -3795,12 +3795,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:37 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:32 EEST 2020** 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:spine-protoc-api:1.5.10` +# Dependencies of `io.spine.tools:spine-protoc-api:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -4120,12 +4120,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:37 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:33 EEST 2020** 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:spine-protoc-plugin:1.5.10` +# Dependencies of `io.spine.tools:spine-protoc-plugin:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -4453,12 +4453,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:38 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:33 EEST 2020** 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:spine-testlib:1.5.10` +# Dependencies of `io.spine:spine-testlib:1.5.11` ## Runtime 1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3 @@ -4832,12 +4832,12 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:38 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:33 EEST 2020** 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:spine-tool-base:1.5.10` +# Dependencies of `io.spine.tools:spine-tool-base:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -5165,12 +5165,12 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:38 EEST 2020** 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). +This report was generated on **Mon Apr 27 19:58:34 EEST 2020** 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:spine-validation-generator:1.5.10` +# Dependencies of `io.spine.tools:spine-validation-generator:1.5.11` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -5498,4 +5498,4 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 27 17:38:39 EEST 2020** 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 +This report was generated on **Mon Apr 27 19:58:34 EEST 2020** 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 6e0082c09e..f2dd9278fa 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-base -1.5.10 +1.5.11 2015 @@ -154,7 +154,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools spine-protoc-plugin - 1.5.10 + 1.5.11 test diff --git a/version.gradle b/version.gradle index 5b89cb4dd1..0d6aa31763 100644 --- a/version.gradle +++ b/version.gradle @@ -25,7 +25,7 @@ * as we want to manage the versions in a single source. */ -final def SPINE_VERSION = '1.5.10' +final def SPINE_VERSION = '1.5.11' ext { spineVersion = SPINE_VERSION