Temporarily restore the Required option class#277
Merged
alexander-yevsyukov merged 4 commits intomasterfrom Mar 12, 2026
Merged
Temporarily restore the Required option class#277alexander-yevsyukov merged 4 commits intomasterfrom
Required option class#277alexander-yevsyukov merged 4 commits intomasterfrom
Conversation
Also: * Deprecate the restored types.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores the deprecated runtime validation option types (notably (required)) to unblock CoreJvm usage during migration, while bumping the snapshot version and regenerating dependency reports.
Changes:
- Reintroduced runtime option classes:
Required,AlwaysRequired, and their shared abstractions. - Bumped project version from
2.0.0-SNAPSHOT.402to2.0.0-SNAPSHOT.403. - Updated generated dependency report and submodule pointer.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps validationVersion to the next snapshot. |
| pom.xml | Aligns Maven project version with the new snapshot. |
| jvm-runtime/src/main/java/io/spine/validation/option/ValidatingOption.java | Restores the common interface for runtime validating options. |
| jvm-runtime/src/main/java/io/spine/validation/option/FieldValidatingOption.java | Restores the abstract base for field-level validating options. |
| jvm-runtime/src/main/java/io/spine/validation/option/Required.java | Restores (required) option behavior and usage warnings. |
| jvm-runtime/src/main/java/io/spine/validation/option/AlwaysRequired.java | Adds “strict” required behavior (always validate). |
| dependencies.md | Regenerates dependency/license report for the new snapshot. |
| config | Updates the config submodule commit reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
jvm-runtime/src/main/java/io/spine/validation/option/FieldValidatingOption.java
Show resolved
Hide resolved
jvm-runtime/src/main/java/io/spine/validation/option/ValidatingOption.java
Show resolved
Hide resolved
armiol
approved these changes
Mar 12, 2026
Collaborator
armiol
left a comment
There was a problem hiding this comment.
@alexander-yevsyukov LGTM. While it shouldn't really matter due to a short lifespan of the respective piece, the comment from Copilot (see my response to it) seems worth time.
jvm-runtime/src/main/java/io/spine/validation/option/FieldValidatingOption.java
Show resolved
Hide resolved
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
Requiredoption class and its parents because the class is used by CoreJvm for obtaining the value of the(required)option which could be possibly set tofalseon an entity state ID field.The need for the
Requiredoption was discovered during migration of Compiler to new Validation along with other dependencies in this PR.Once CoreJvm is updated to avoid using (now deprecated) class, the deprecated code will be removed.
It was locally tested that the patch to Validation works with the updated Compiler code.