Restore ErrorPlaceholder in the tools package#302
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores the deprecated io.spine.tools.validation.ErrorPlaceholder enum for backward compatibility (to unblock older Spine Time code generation) and adds interoperability in the Java renderer by reintroducing templateString() support for the legacy placeholder type.
Changes:
- Reintroduced
io.spine.tools.validation.ErrorPlaceholder(deprecated) with conversion toio.spine.validation.ErrorPlaceholder. - Added a deprecated
templateString()overload accepting the legacy placeholder enum and deprecatedWHEN_INin the runtime enum. - Bumped snapshot version references and refreshed published docs/dependency artifacts.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps published Validation snapshot version to ...421. |
| jvm-runtime/src/main/kotlin/io/spine/validation/ErrorPlaceholder.kt | Deprecates WHEN_IN placeholder in runtime enum. |
| java/src/main/kotlin/io/spine/tools/validation/java/expression/TemplateStrings.kt | Adds legacy-placeholder overload for templateString(); introduces JVM-name disambiguation. |
| context/src/main/kotlin/io/spine/tools/validation/ErrorPlaceholder.kt | Restores deprecated legacy ErrorPlaceholder enum and provides toRuntime() conversion. |
| docs/dependencies/pom.xml | Updates docs POM version to ...421. |
| docs/dependencies/dependencies.md | Updates dependency report headers/timestamps (but one header remains on ...420). |
| docs/content/docs/validation/user/01-getting-started/adding-to-build.md | Updates plugin version in docs snippet to ...421. |
| docs/content/docs/validation/developer/build-and-release.md | Updates version snippet to ...421. |
| buildSrc/src/test/kotlin/io/spine/gradle/report/license/DependencyReportOutputTest.kt | Simplifies dependency-report tests by removing legacy file setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
armiol
approved these changes
May 15, 2026
ErrorPlaceholder in the tools packageTemplatesString and Placeholder from Spine Base
TemplatesString and Placeholder from Spine BaseErrorPlaceholder in the tools package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR restores the
io.spine.tools.validation.ErrorPlacehodertype that was removed in #300.Other notable changes
WHEN_INitem ofio.spine.validation.ErrorPlaceholderwas deprecated encouraging to use the code from Spine Time. We don't have an arrangement for introducing new placeholders. The deprecation would encourage the efforts towards the addressing the need.