Skip to content

Remove dead ValidatorGenerator (#319) and refresh local Spine SDK dependencies#320

Merged
alexander-yevsyukov merged 4 commits into
masterfrom
raise-coverage-more
Jul 7, 2026
Merged

Remove dead ValidatorGenerator (#319) and refresh local Spine SDK dependencies#320
alexander-yevsyukov merged 4 commits into
masterfrom
raise-coverage-more

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Collaborator

Summary

Three related pieces of housekeeping on this branch:

  1. Remove dead ValidatorGenerator/ApplyValidatorresolves Remove dead ValidatorGenerator/ApplyValidator (unreachable, superseded by ValidatorRegistry) #319.
  2. Refresh local/ Spine SDK dependencies to their latest published snapshots.
  3. Bump the published version 2.0.0-SNAPSHOT.449 → .450 and regenerate dependency reports.

1. Remove dead code (closes #319)

ValidatorGenerator and its nested ApplyValidator were never instantiated — no
direct construction, no reflection, no ServiceLoader (the module's only
ServiceLoader.load targets ValidationOption), and no META-INF/services entry.
The nested-message validation they were designed to generate at compile time is
handled at runtime by io.spine.validation.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; the five expression helpers it imported
(constraintViolation, mergeFrom, orElse, resolve, stringify) remain used
across other files, so nothing new becomes dead.

Closes #319.

2. Refresh local/ Spine SDK dependencies

Object Old → New
Base .421 → .423
Compiler .059 → .060
Logging .419 → .422
Time .242 → .244
ToolBase .402 → .403
Validation .446 → .449

CoreJvm is intentionally held back at .381. Its latest snapshot (.411)
removes io.spine.server.entity.alter, still used by ~11 option views in the
context module — adopting it fails :context:compileKotlin with Unresolved reference 'alter'. Moving to a newer CoreJvm needs a coordinated alter migration,
which is out of scope for a version refresh and should land as its own change.

3. Version bump + reports

  • version.gradle.kts: validationVersion 2.0.0-SNAPSHOT.449 → .450.
  • docs/dependencies/pom.xml and dependencies.md regenerated to match.

Verification

  • ./gradlew build dokkaGenerateBUILD SUCCESSFUL (full compile + test suite + Dokka; the removal breaks no KDoc links).
  • Pre-PR reviewers all APPROVE with zero Must-fix / Should-fix: 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

alexander-yevsyukov and others added 4 commits July 7, 2026 17:18
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>
Copilot AI review requested due to automatic review settings July 7, 2026 16:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.kt implementation 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

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.63%. Comparing base (99aa75e) to head (77608c9).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Jul 7, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to In Review in v2.0 Jul 7, 2026
@alexander-yevsyukov alexander-yevsyukov moved this from In Review to 🏗 In progress in v2.0 Jul 7, 2026
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jul 7, 2026
@alexander-yevsyukov alexander-yevsyukov merged commit c737fc1 into master Jul 7, 2026
13 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the raise-coverage-more branch July 7, 2026 17:45
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove dead ValidatorGenerator/ApplyValidator (unreachable, superseded by ValidatorRegistry)

3 participants