Skip to content

Remove the proto-descriptor build-cache workaround (#200) - #201

Merged
alexander-yevsyukov merged 6 commits into
masterfrom
remove-proto-descriptors-shim
Jun 26, 2026
Merged

Remove the proto-descriptor build-cache workaround (#200)#201
alexander-yevsyukov merged 6 commits into
masterfrom
remove-proto-descriptors-shim

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

What

Removes the temporary excludeProtoDescriptorsFromBuildCache() workaround now that the upstream root cause is fixed, together with the dependency refresh that adopts the fix.

  • Adopt the upstream fix. Bump tool-base 2.0.0-SNAPSHOT.401 → .402, which includes tool-base#184"Fix descriptor set generation when the project version changes" — the fix for the root cause tool-base#183.
  • Remove the workaround. Drop the excludeProtoDescriptorsFromBuildCache() helper and its call from build.gradle.kts; the generateProto / generateTestProto / generateTestFixturesProto tasks are cacheable again.
  • Refresh other local Spine deps: Base .420 → .421, CoreJvm .380 → .381, CoreJvmCompiler .079 → .080.
  • Bump the project version 2.0.0-SNAPSHOT.212 → .213 and regenerate the dependency reports.

Why

excludeProtoDescriptorsFromBuildCache() opted the descriptor-generating tasks out of the Gradle build cache because their version-named descriptor set (*.desc + desc.ref, backing io.spine.type.KnownTypes) could be restored stale from the cache after a version bump — the build-cache key omitted the project version — making the runtime fail with io.spine.type.UnknownTypeException.

That root cause is fixed upstream (tool-base#183, via tool-base#184) and the fix is now adopted here through tool-base 2.0.0-SNAPSHOT.402, so the workaround is no longer needed.

Closes #200.

Verification

A full ./gradlew clean build --build-cache — with the build cache enabled, i.e. the exact scenario the workaround guarded against — completed with 0 test failures and 0 UnknownTypeException, including the :datastore Testcontainers tests that exercise KnownTypes. The dependency reports (docs/dependencies/pom.xml, dependencies.md) were regenerated from a full configuration so they match the canonical report on master.

alexander-yevsyukov and others added 6 commits June 25, 2026 19:49
A standalone `generatePom` (run without the Checkstyle/PMD/test tasks in
the task graph) had dropped the build-tool dependencies — Checkstyle,
PMD, JUnit BOM and the Kotlin build tools — from
`docs/dependencies/pom.xml`. Regenerate from a full configuration so the
aggregated report matches the one on `master`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 20:00
@alexander-yevsyukov alexander-yevsyukov self-assigned this Jun 25, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Jun 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the Gradle build-cache opt-out for Protobuf descriptor generation now that the upstream tooling fix is adopted, while also refreshing local Spine dependency versions and tightening version-increment verification behavior for CI and local Maven Local publishing workflows.

Changes:

  • Bump project version to 2.0.0-SNAPSHOT.213 and refresh dependency reports.
  • Adopt tool-base 2.0.0-SNAPSHOT.402 (plus related Spine dependency bumps) and remove the excludeProtoDescriptorsFromBuildCache() workaround from build.gradle.kts.
  • Extend IncrementGuard wiring/logic so version increment verification runs before check and before Maven Local publishes (when applicable), with tests updated accordingly.

Reviewed changes

Copilot reviewed 9 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 published project version to 2.0.0-SNAPSHOT.213.
build.gradle.kts Removes the Protobuf descriptor build-cache opt-out workaround from subproject configuration.
docs/dependencies/pom.xml Regenerates the aggregated dependency POM to reflect updated versions/deps.
docs/dependencies/dependencies.md Regenerates the dependency/license report with updated versions and timestamps.
buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt Updates tool-base version constants to .402.
buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt Updates spine-base version constants to .421.
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt Updates core-jvm-plugins version constants to .080.
buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt Adjusts when/how version-increment verification is executed and wires it into publish/check task paths.
buildSrc/src/test/kotlin/io/spine/gradle/publish/IncrementGuardTest.kt Adds/extends coverage for the new IncrementGuard decision logic and task wiring.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.76%. Comparing base (87083b3) to head (cde17f1).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #201   +/-   ##
=========================================
  Coverage     90.76%   90.76%           
  Complexity      466      466           
=========================================
  Files            62       62           
  Lines          1625     1625           
  Branches         90       90           
=========================================
  Hits           1475     1475           
  Misses          121      121           
  Partials         29       29           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov
alexander-yevsyukov merged commit eba2763 into master Jun 26, 2026
10 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the remove-proto-descriptors-shim branch June 26, 2026 08:20
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in v2.0 Jun 26, 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 the excludeProtoDescriptorsFromBuildCache() workaround once tool-base#183 is fixed

3 participants