Skip to content

Remove handling of the (when) option#291

Merged
alexander-yevsyukov merged 3 commits intomasterfrom
remove-when-option
Apr 29, 2026
Merged

Remove handling of the (when) option#291
alexander-yevsyukov merged 3 commits intomasterfrom
remove-when-option

Conversation

@alexander-yevsyukov
Copy link
Copy Markdown
Collaborator

This PR removes the code related to the (when) option because it's now a part of the Time library.

Also, config was updated.

Copy link
Copy Markdown
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

This PR removes (when) option handling from the Validation codebase (and its dedicated test modules), reflecting that (when) is now provided by the Time library, and bumps the published Validation SDK version.

Changes:

  • Removed the Java-side (when) option implementation (reaction, view, generator) and its supporting protos.
  • Removed now-obsolete (when)-focused test modules/fixtures and excluded them from Gradle settings.
  • Bumped the published version to 2.0.0-SNAPSHOT.414 and updated related config.

Reviewed changes

Copilot reviewed 40 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version.gradle.kts Bumps validationVersion to .414.
time-validation-tests/src/testFixtures/proto/spine/validation/when_option_spec.proto Removes (when) option proto test fixtures.
time-validation-tests/src/test/kotlin/io/spine/tools/time/validation/java/WhenOptionSpec.kt Removes (when) option descriptor/name test.
time-validation-tests/src/test/kotlin/io/spine/tools/time/validation/WhenReactionSpec.kt Removes compilation-error tests for invalid (when) usage.
time-validation-tests/src/test/kotlin/io/spine/tools/time/validation/CompilationErrorTest.kt Removes shared compilation-error test base for the deleted module.
time-validation-tests/build.gradle.kts Removes the time-validation-tests module build configuration.
time-validation-tests/Module.md Removes module documentation for (when) compilation tests.
tests/time-validating/src/testFixtures/proto/spine/test/tools/validate/when_repeated.proto Removes (when) repeated-field fixtures.
tests/time-validating/src/testFixtures/proto/spine/test/tools/validate/when.proto Removes (when) fixtures for timestamps/temporals.
tests/time-validating/src/test/kotlin/io/spine/test/options/when/SpineTemporalWhenSpec.kt Removes runtime validation tests for Spine Temporal + (when).
tests/time-validating/src/test/kotlin/io/spine/test/options/when/ProtoTimestampWhenSpec.kt Removes runtime validation tests for Protobuf Timestamp + (when).
tests/time-validating/build.gradle.kts Removes :tests:time-validating module build config.
tests/time-consumer/src/test/kotlin/io/spine/validation/test/WhenRuleITest.kt Removes consumer integration tests for (when) rule.
tests/time-consumer/src/test/kotlin/io/spine/validation/test/Assertions.kt Removes consumer test assertions used by deleted integration tests.
tests/time-consumer/src/main/proto/test/football.proto Removes consumer proto that exercised (when) on Player.
tests/time-consumer/build.gradle.kts Removes :tests:time-consumer module build config.
tests/consumer/src/main/proto/test/time.proto Removes (when)-related timestamp messages and time_options import from consumer protos.
tests/consumer/src/main/proto/test/football.proto Removes (when) usage and time_options import from consumer protos.
tests/build.gradle.kts Removes time-validating from the set of test projects configured with CoreJvm compiler plugin.
settings.gradle.kts Removes time-validation-tests, :tests:time-consumer, and :tests:time-validating from the build.
pom.xml Bumps project version to .414 and removes some Kotlin build tool dependencies from the generated dependency list.
java/src/main/proto/spine/tools/time/validation/views.proto Removes (when) view model proto.
java/src/main/proto/spine/tools/time/validation/time_field_type.proto Removes enum describing supported (when) time field types.
java/src/main/proto/spine/tools/time/validation/events.proto Removes (when) discovery event proto.
java/src/main/kotlin/io/spine/tools/time/validation/java/WhenOption.kt Removes (when) option registration, reaction, view, and placeholder support.
java/src/main/kotlin/io/spine/tools/time/validation/java/WhenGenerator.kt Removes Java code generation for (when) option checks.
buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt Updates local Validation dependency metadata/version constant.
.gitignore Adds Python cache ignores (__pycache__/, *.pyc).
.agents/skills/update-copyright/tests/test_update_copyright.py Adds unit tests for the new copyright update script.
.agents/skills/update-copyright/scripts/update_copyright.py Adds a script to update existing copyright headers from IntelliJ profiles.
.agents/skills/update-copyright/agents/openai.yaml Registers the new agent skill interface metadata.
.agents/skills/update-copyright/SKILL.md Documents usage/workflow constraints for the new skill.
.agents/skills/move-files/agents/openai.yaml Registers the “move-files” agent skill.
.agents/skills/move-files/SKILL.md Documents workflow for safe file moves/renames.
.agents/skills/java-to-kotlin/agents/openai.yaml Registers the “java-to-kotlin” agent skill.
.agents/skills/java-to-kotlin/SKILL.md Adds front-matter metadata to the existing skill doc.
.agents/quick-reference-card.md Updates quick reference content (removes model-specific guidance).
.agents/_TOC.md Updates TOC link to the new Java-to-Kotlin skill doc location.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* The version of the Validation library artifacts.
*/
const val version = "2.0.0-SNAPSHOT.411"
const val version = "2.0.0-SNAPSHOT.413"
Comment on lines 24 to 26

float seconds = 3 [(min).value = "0.0", (max).value = "59.999"];
}
Comment on lines 15 to 20

string shirt_name = 1 [(pattern) = {
regex: "[\\w\\-.\\s]{2,}"
error_msg: "Invalid T-Shirt name."
}];

google.protobuf.Timestamp started_career_in = 2 [(when).in = PAST];
}
@alexander-yevsyukov alexander-yevsyukov merged commit acc61b2 into master Apr 29, 2026
11 of 12 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the remove-when-option branch April 29, 2026 15:22
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