From d75f79b006eedd77403b74616be09c58e726a962 Mon Sep 17 00:00:00 2001 From: yevhenii-nadtochii Date: Mon, 14 Apr 2025 17:33:19 +0200 Subject: [PATCH 1/6] Introduce `subject` field to all option events --- .../main/proto/spine/protodata/events.proto | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/api/src/main/proto/spine/protodata/events.proto b/api/src/main/proto/spine/protodata/events.proto index caa3d7aba..0e13e93e6 100644 --- a/api/src/main/proto/spine/protodata/events.proto +++ b/api/src/main/proto/spine/protodata/events.proto @@ -58,11 +58,14 @@ message FileEntered { message FileOptionDiscovered { option (is).java_type = "io.spine.protodata.ast.OptionAware"; - // The file, option of which was found. - File file = 1 [(required) = true]; + // Deprecated: please use `subject` instead. + File file = 1 [deprecated = true]; // The discovered option. Option option = 2 [(required) = true]; + + // The file in which the option is discovered. + File subject = 3[(required) = true]; } // Emitted when a file is completely discovered, including all the types, etc. @@ -93,17 +96,20 @@ message TypeEntered { } // Emitted when a message-level option is found. -message TypeOptionDiscovered { +message MessageOptionDiscovered { option (is).java_type = "io.spine.protodata.ast.OptionAware"; // The file in which the type is defined. File file = 1 [(required) = true]; - // The type in which the option is discovered. - TypeName type = 2 [(required) = true]; + // Deprecated: please use `subject` instead. + TypeName type = 2 [deprecated = true]; // The discovered option. Option option = 3 [(required) = true]; + + // The message type in which the option is discovered. + MessageType subject = 4 [(required) = true]; } // Emitted when a message type is completely discovered, including all the fields, etc. @@ -182,16 +188,10 @@ message FieldOptionDiscovered { // The file in which the field is defined. File file = 1 [(required) = true]; - // The type in which the field is defined. - // // Deprecated: please use `subject` instead. - // TypeName type = 2 [deprecated = true]; - // The field in which the option is discovered. - // // Deprecated: please use `subject` instead. - // FieldName field = 3 [deprecated = true]; // The field in which the option is discovered. @@ -241,11 +241,14 @@ message EnumOptionDiscovered { // The file in which the enum is defined. File file = 1 [(required) = true]; - // The type name of the enum. - TypeName type = 2 [(required) = true]; + // Deprecated: please use `subject` instead. + TypeName type = 2 [deprecated = true]; // The discovered option. Option option = 3 [(required) = true]; + + // The enum in which the option is discovered. + EnumType subject = 4 [(required) = true]; } // Emitted when processing reaches an enum constant a.k.a. enum value. @@ -268,14 +271,17 @@ message EnumConstantOptionDiscovered { // The file in which the enum is defined. File file = 1 [(required) = true]; - // The type name of the enum. - TypeName type = 2 [(required) = true]; + // Deprecated: please use `subject` instead. + TypeName type = 2 [deprecated = true]; - // The enum constant in which the option is discovered. - ConstantName constant = 3 [(required) = true]; + // Deprecated: please use `subject` instead. + ConstantName constant = 3 [deprecated = true]; // The discovered option. Option option = 4 [(required) = true]; + + // The enum constant in which the option is discovered. + EnumConstant subject = 5 [(required) = true]; } // Emitted when an enum constant is completely discovered. @@ -328,11 +334,14 @@ message ServiceOptionDiscovered { // The file in which the service is defined. File file = 1 [(required) = true]; - // The name of the service in which the option is discovered. - ServiceName service = 2 [(required) = true]; + // Deprecated: please use `subject` instead. + ServiceName service = 2 [deprecated = true]; // The discovered option. Option option = 3 [(required) = true]; + + // The service in which the option is discovered. + Service subject = 4 [(required) = true]; } // Emitted when a service is completely discovered, including all the option and RPCs. @@ -365,14 +374,17 @@ message RpcOptionDiscovered { // The file in which the RPC is defined. File file = 1 [(required) = true]; - // The name of the service in which the RPC is defined. - ServiceName service = 2 [(required) = true]; + // Deprecated: please use `subject` instead. + ServiceName service = 2 [deprecated = true]; - // The RPC in which the option is discovered. - RpcName rpc = 3 [(required) = true]; + // Deprecated: please use `subject` instead. + RpcName rpc = 3 [deprecated = true]; // The discovered option. Option option = 4 [(required) = true]; + + // The RPC in which the option is discovered. + Rpc subject = 5 [(required) = true]; } // Emitted when an RPC is completely discovered. From daf53b1795bb9aa8271be3b9c7d2196d1dd20c08 Mon Sep 17 00:00:00 2001 From: yevhenii-nadtochii Date: Mon, 14 Apr 2025 17:45:20 +0200 Subject: [PATCH 2/6] Put a missing whitespace --- api/src/main/proto/spine/protodata/events.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/proto/spine/protodata/events.proto b/api/src/main/proto/spine/protodata/events.proto index 0e13e93e6..6de27502d 100644 --- a/api/src/main/proto/spine/protodata/events.proto +++ b/api/src/main/proto/spine/protodata/events.proto @@ -65,7 +65,7 @@ message FileOptionDiscovered { Option option = 2 [(required) = true]; // The file in which the option is discovered. - File subject = 3[(required) = true]; + File subject = 3 [(required) = true]; } // Emitted when a file is completely discovered, including all the types, etc. From 3dcca11a46cf74e4948f696cb86334a6c2c7cc32 Mon Sep 17 00:00:00 2001 From: yevhenii-nadtochii Date: Tue, 15 Apr 2025 14:49:42 +0200 Subject: [PATCH 3/6] Address deprecations --- .../io/spine/protodata/backend/event/CompilerEvents.kt | 2 +- .../kotlin/io/spine/protodata/backend/event/EnumEvents.kt | 5 ++--- .../io/spine/protodata/backend/event/MessageEvents.kt | 6 +++--- .../io/spine/protodata/backend/event/ServiceEvents.kt | 5 ++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt b/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt index 122f29d4a..be08ef710 100644 --- a/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt +++ b/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt @@ -131,7 +131,7 @@ private class ProtoFileEvents( ) produceOptionEvents(file.options, file) { fileOptionDiscovered { - file = header.file + subject = header.file option = it } } diff --git a/backend/src/main/kotlin/io/spine/protodata/backend/event/EnumEvents.kt b/backend/src/main/kotlin/io/spine/protodata/backend/event/EnumEvents.kt index 451611fbb..f75c2a309 100644 --- a/backend/src/main/kotlin/io/spine/protodata/backend/event/EnumEvents.kt +++ b/backend/src/main/kotlin/io/spine/protodata/backend/event/EnumEvents.kt @@ -76,7 +76,7 @@ internal class EnumEvents(header: ProtoFileHeader) : DeclarationEvents Date: Tue, 15 Apr 2025 14:50:00 +0200 Subject: [PATCH 4/6] Bump the version -> `0.93.12` --- version.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.gradle.kts b/version.gradle.kts index 0b9a33c02..7acc31c5f 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -32,4 +32,4 @@ * * For dependencies on Spine SDK module please see [io.spine.dependency.local.Spine]. */ -val protoDataVersion: String by extra("0.93.11") +val protoDataVersion: String by extra("0.93.12") From 3cfab3dee865ce892e313bcbac834bf1e9d9aa3c Mon Sep 17 00:00:00 2001 From: yevhenii-nadtochii Date: Tue, 15 Apr 2025 14:52:51 +0200 Subject: [PATCH 5/6] Update dependency reports --- dependencies.md | 44 ++++++++++++++++++++++---------------------- pom.xml | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dependencies.md b/dependencies.md index 822d8038e..c6b833977 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.protodata:protodata-api:0.93.11` +# Dependencies of `io.spine.protodata:protodata-api:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -1113,12 +1113,12 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:09 CEST 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). +This report was generated on **Tue Apr 15 14:51:22 CEST 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.protodata:protodata-api-tests:0.93.11` +# Dependencies of `io.spine.protodata:protodata-api-tests:0.93.12` ## Runtime 1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. @@ -1955,12 +1955,12 @@ This report was generated on **Mon Apr 14 13:39:09 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:09 CEST 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). +This report was generated on **Tue Apr 15 14:51:22 CEST 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.protodata:protodata-backend:0.93.11` +# Dependencies of `io.spine.protodata:protodata-backend:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -3069,12 +3069,12 @@ This report was generated on **Mon Apr 14 13:39:09 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:09 CEST 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). +This report was generated on **Tue Apr 15 14:51:23 CEST 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.protodata:protodata-cli:0.93.11` +# Dependencies of `io.spine.protodata:protodata-cli:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -4218,12 +4218,12 @@ This report was generated on **Mon Apr 14 13:39:09 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:10 CEST 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). +This report was generated on **Tue Apr 15 14:51:23 CEST 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.protodata:protodata-gradle-api:0.93.11` +# Dependencies of `io.spine.protodata:protodata-gradle-api:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -5259,12 +5259,12 @@ This report was generated on **Mon Apr 14 13:39:10 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:10 CEST 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). +This report was generated on **Tue Apr 15 14:51:23 CEST 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.protodata:protodata-gradle-plugin:0.93.11` +# Dependencies of `io.spine.protodata:protodata-gradle-plugin:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -6388,12 +6388,12 @@ This report was generated on **Mon Apr 14 13:39:10 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:10 CEST 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). +This report was generated on **Tue Apr 15 14:51:24 CEST 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.protodata:protodata-java:0.93.11` +# Dependencies of `io.spine.protodata:protodata-java:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -7502,12 +7502,12 @@ This report was generated on **Mon Apr 14 13:39:10 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:11 CEST 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). +This report was generated on **Tue Apr 15 14:51:24 CEST 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.protodata:protodata-params:0.93.11` +# Dependencies of `io.spine.protodata:protodata-params:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -8619,12 +8619,12 @@ This report was generated on **Mon Apr 14 13:39:11 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:11 CEST 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). +This report was generated on **Tue Apr 15 14:51:24 CEST 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.protodata:protodata-protoc:0.93.11` +# Dependencies of `io.spine.protodata:protodata-protoc:0.93.12` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -9454,12 +9454,12 @@ This report was generated on **Mon Apr 14 13:39:11 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:11 CEST 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). +This report was generated on **Tue Apr 15 14:51:24 CEST 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.protodata:protodata-test-env:0.93.11` +# Dependencies of `io.spine.protodata:protodata-test-env:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -10575,12 +10575,12 @@ This report was generated on **Mon Apr 14 13:39:11 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:11 CEST 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). +This report was generated on **Tue Apr 15 14:51:25 CEST 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.protodata:protodata-testlib:0.93.11` +# Dependencies of `io.spine.protodata:protodata-testlib:0.93.12` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3. @@ -11815,4 +11815,4 @@ This report was generated on **Mon Apr 14 13:39:11 CEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 14 13:39:12 CEST 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 +This report was generated on **Tue Apr 15 14:51:25 CEST 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 638596cd7..835597333 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.protodata ProtoData -0.93.11 +0.93.12 2015 From 2d6789eac655e42243eb223c32641dca71977a6f Mon Sep 17 00:00:00 2001 From: yevhenii-nadtochii Date: Tue, 15 Apr 2025 15:09:49 +0200 Subject: [PATCH 6/6] Roll back the `FileOptionDiscovered.file` property --- api/src/main/proto/spine/protodata/events.proto | 7 ++----- .../io/spine/protodata/backend/event/CompilerEvents.kt | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/api/src/main/proto/spine/protodata/events.proto b/api/src/main/proto/spine/protodata/events.proto index 6de27502d..c5524b9c4 100644 --- a/api/src/main/proto/spine/protodata/events.proto +++ b/api/src/main/proto/spine/protodata/events.proto @@ -58,14 +58,11 @@ message FileEntered { message FileOptionDiscovered { option (is).java_type = "io.spine.protodata.ast.OptionAware"; - // Deprecated: please use `subject` instead. - File file = 1 [deprecated = true]; + // The file in which the option is discovered. + File file = 1 [(required) = true]; // The discovered option. Option option = 2 [(required) = true]; - - // The file in which the option is discovered. - File subject = 3 [(required) = true]; } // Emitted when a file is completely discovered, including all the types, etc. diff --git a/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt b/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt index be08ef710..122f29d4a 100644 --- a/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt +++ b/backend/src/main/kotlin/io/spine/protodata/backend/event/CompilerEvents.kt @@ -131,7 +131,7 @@ private class ProtoFileEvents( ) produceOptionEvents(file.options, file) { fileOptionDiscovered { - subject = header.file + file = header.file option = it } }