Using of the latest version of spine-mc-java in web repository fails the build with a compilation error. The generated code contains validate() method that has an unexpected return type.
The problematic versions are 2.0.0-SNAPSHOT.90 / 2.0.0-SNAPSHOT.91.
web/firebase-web/generated/main/java/io/spine/web/firebase/subscription/FirebaseSubscription.java:880: error: incompatible types: ImmutableList<ConstraintViolation> cannot be converted to Optional<ValidationError>
java.util.Optional<io.spine.validate.ValidationError> generated_validationError_subscription = this.getSubscription().validate();
^
Additional remark for those who will reproduce the issue. When bumping the version of mc-java, the version of mc-js is usually also bumped. Bumping of mc-jc requires the code below to be dropped out from config. The protoJs extension has been transformed. Take a look on this PR for details.
In buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt:
project.withGroovyBuilder {
"protoJs" {
setProperty("generatedMainDir", genProtoMain)
setProperty("generatedTestDir", genProtoTest)
}
}
Using of the latest version of
spine-mc-javainwebrepository fails the build with a compilation error. The generated code containsvalidate()method that has an unexpected return type.The problematic versions are
2.0.0-SNAPSHOT.90/2.0.0-SNAPSHOT.91.Additional remark for those who will reproduce the issue. When bumping the version of
mc-java, the version ofmc-jsis usually also bumped. Bumping ofmc-jcrequires the code below to be dropped out fromconfig. TheprotoJsextension has been transformed. Take a look on this PR for details.In
buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt:project.withGroovyBuilder { "protoJs" { setProperty("generatedMainDir", genProtoMain) setProperty("generatedTestDir", genProtoTest) } }