Remove dead ValidatorGenerator (#319) and refresh local Spine SDK dependencies#320
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refresh the `local/` Spine SDK dependency objects to their latest published snapshots from the Spine Artifact Registry: - Base 2.0.0-SNAPSHOT.421 -> .423 - Compiler 2.0.0-SNAPSHOT.059 -> .060 - Logging 2.0.0-SNAPSHOT.419 -> .422 - Time 2.0.0-SNAPSHOT.242 -> .244 - ToolBase 2.0.0-SNAPSHOT.402 -> .403 - Validation 2.0.0-SNAPSHOT.446 -> .449 CoreJvm's latest snapshot (.411) is held back at .381: it removes `io.spine.server.entity.alter`, still used by the `context` option views, so adopting it needs a coordinated code migration that is out of scope here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Regenerated after bumping the published version to `2.0.0-SNAPSHOT.450` and refreshing the `local/` Spine SDK dependencies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`ValidatorGenerator` and its nested `ApplyValidator` were never instantiated: no direct construction, no reflection, no `ServiceLoader` (the module's only `ServiceLoader` loads `ValidationOption`), and no `META-INF/services` entry. The nested-message validation they generated at compile time is handled at runtime by `ValidatorRegistry.validate(...)` via `ValidationCodeInjector`, so the class was superseded and unreachable. Removing the file also drops its file-local `ValidatorClass`/`MessageClass` typealiases, which had no other users. Fixes #319. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs repository housekeeping by removing unreachable Java-validation codegen (ValidatorGenerator/ApplyValidator), refreshing pinned Spine SDK snapshot dependencies under buildSrc, and bumping the project snapshot version while regenerating dependency reports.
Changes:
- Bump the published snapshot version to
2.0.0-SNAPSHOT.450. - Remove the unused
ValidatorGenerator.ktimplementation from the Java generator package. - Refresh pinned
local/Spine SDK snapshot versions and regenerate dependency report artifacts.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
version.gradle.kts |
Bumps the repo’s published validationVersion to .450. |
java/src/main/kotlin/io/spine/tools/validation/java/generate/ValidatorGenerator.kt |
Removes dead/unreferenced generator code. |
docs/dependencies/pom.xml |
Updates the generated dependency POM to reflect refreshed snapshot versions. |
docs/dependencies/dependencies.md |
Updates the generated dependency/license report for the new snapshot version. |
buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt |
Refreshes the pinned Validation SDK snapshot version used by build logic. |
buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt |
Refreshes the pinned ToolBase snapshot version. |
buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt |
Refreshes the pinned Time snapshot version. |
buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt |
Refreshes the pinned Logging snapshot version. |
buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt |
Refreshes the pinned Compiler snapshot version. |
buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt |
Refreshes the pinned Base snapshot version. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #320 +/- ##
============================================
+ Coverage 90.55% 92.63% +2.07%
Complexity 363 363
============================================
Files 85 84 -1
Lines 2138 2090 -48
Branches 161 157 -4
============================================
Hits 1936 1936
+ Misses 158 110 -48
Partials 44 44 🚀 New features to boost your workflow:
|
armiol
approved these changes
Jul 7, 2026
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.
Summary
Three related pieces of housekeeping on this branch:
ValidatorGenerator/ApplyValidator— resolves Remove deadValidatorGenerator/ApplyValidator(unreachable, superseded byValidatorRegistry) #319.local/Spine SDK dependencies to their latest published snapshots.2.0.0-SNAPSHOT.449 → .450and regenerate dependency reports.1. Remove dead code (closes #319)
ValidatorGeneratorand its nestedApplyValidatorwere never instantiated — nodirect construction, no reflection, no
ServiceLoader(the module's onlyServiceLoader.loadtargetsValidationOption), and noMETA-INF/servicesentry.The nested-message validation they were designed to generate at compile time is
handled at runtime by
io.spine.validation.ValidatorRegistry.validate(...)viaValidationCodeInjector, so the class was superseded and unreachable.Removing the file also drops its file-local
ValidatorClass/MessageClasstypealiases, which had no other users; the five expression helpers it imported
(
constraintViolation,mergeFrom,orElse,resolve,stringify) remain usedacross other files, so nothing new becomes dead.
Closes #319.
2. Refresh
local/Spine SDK dependencies.421 → .423.059 → .060.419 → .422.242 → .244.402 → .403.446 → .449CoreJvmis intentionally held back at.381. Its latest snapshot (.411)removes
io.spine.server.entity.alter, still used by ~11 option views in thecontextmodule — adopting it fails:context:compileKotlinwithUnresolved reference 'alter'. Moving to a newer CoreJvm needs a coordinatedaltermigration,which is out of scope for a version refresh and should land as its own change.
3. Version bump + reports
version.gradle.kts:validationVersion2.0.0-SNAPSHOT.449 → .450.docs/dependencies/pom.xmlanddependencies.mdregenerated to match.Verification
./gradlew build dokkaGenerate— BUILD SUCCESSFUL (full compile + test suite + Dokka; the removal breaks no KDoc links).dependency-audit,spine-code-review,kotlin-engineer,review-docs.Note for reviewers
Pre-existing, unrelated working-tree changes (
.idea/misc.xml,docs/_examples) were deliberately kept out of this PR.🤖 Generated with Claude Code