Skip to content

Temporarily restore the Required option class#277

Merged
alexander-yevsyukov merged 4 commits intomasterfrom
restore-required-option
Mar 12, 2026
Merged

Temporarily restore the Required option class#277
alexander-yevsyukov merged 4 commits intomasterfrom
restore-required-option

Conversation

@alexander-yevsyukov
Copy link
Collaborator

@alexander-yevsyukov alexander-yevsyukov commented Mar 11, 2026

This PR restores the Required option class and its parents because the class is used by CoreJvm for obtaining the value of the (required) option which could be possibly set to false on an entity state ID field.

The need for the Required option 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.

Copilot AI review requested due to automatic review settings March 11, 2026 21:36
@alexander-yevsyukov alexander-yevsyukov self-assigned this Mar 11, 2026
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review March 11, 2026 21:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.402 to 2.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.

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@alexander-yevsyukov alexander-yevsyukov merged commit a1d8183 into master Mar 12, 2026
10 of 12 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the restore-required-option branch March 12, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants