Skip to content

Bump CoreJvm and exclude JetBrains Annotations from the published plugin graph#83

Open
alexander-yevsyukov wants to merge 20 commits into
masterfrom
bump-core-jvm
Open

Bump CoreJvm and exclude JetBrains Annotations from the published plugin graph#83
alexander-yevsyukov wants to merge 20 commits into
masterfrom
bump-core-jvm

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

Bumps CoreJvm to 2.0.0-SNAPSHOT.522 and makes the Compiler Gradle plugin resolvable on Gradle 9.6 build script classpaths without consumer-side workarounds.

What changed

  • CoreJvm 2.0.0-SNAPSHOT.510.522 (via .511 and .521), adjusting View.kt for the upstream removal of ViewRepository.logName().
  • JetBrains Annotations exclusion — the root-cause fix of this PR. Gradle pins org.jetbrains:annotations to {strictly 13.0} on build script classpaths ("Pinned to the embedded Kotlin"), while kotlinx-coroutines (via Aedile and others) requires 23.0.0. Whether Gradle 9.6 reconciles the two turned out to be dependency-graph-shape sensitive: the CoreJvm bump reshaped the graph enough to make the plugin unresolvable in consumer builds. The module is now excluded from the Aedile dependency of :api and from every published dependency of :gradle-plugin (documented helper excludeJetBrainsAnnotations()). The annotations are compile-time metadata; consumers still receive 13.0 through the kotlin-stdlib edge, which satisfies the pin.
  • Workaround cleanup — the interim force(JetBrainsAnnotations.lib) additions are reverted in the functional-test fixture templates and removed from the consumer and in-place-consumer fixtures, so the integration tests now guard the exclusion against regressions. compiler-extension keeps its force — its classpath also holds the CoreJvm Compiler plugin, which still carries the requirement — with a TODO: stating the removal condition.
  • Gradle 9.6 deprecation fixestasks.register<Test>("performanceTest") in backend, and extra["compilerVersion"] as String instead of the deprecated by extra delegate across the tests/ build scripts.
  • Team-memory entry documenting the diagnosis and the producer-side exclusion pattern.

Verification

  • ./gradlew build dokkaGenerate green at HEAD, including :gradle-plugin:functionalTest (force-free fixtures) and :integrationTest.
  • A consumer-mirror probe — kotlin("jvm") 2.3.21 + com.google.protobuf + id("io.spine.compiler") resolved from Maven Local with no forces — fails against the .063-era metadata and passes with this branch's artifacts.
  • Reviewers: dependency-audit and kotlin-engineer approved; spine-code-review and review-docs approved with changes, both addressed (grpcContext force drop documented; removal condition converted to Spine TODO: format).

Notes for reviewers

  • The CoreJvm .522 artifacts (spine-core, spine-client, spine-server) currently exist in the developer's Maven Local; they must be available in the artifact registry before merging.
  • Follow-ups outside this repo: the CoreJvm Compiler plugin needs the same annotations exclusion in its own repository, and the excludeJetBrainsAnnotations() helper is a candidate for hoisting into the shared config buildSrc once a second repository needs it.

🤖 Generated with Claude Code

alexander-yevsyukov and others added 17 commits July 24, 2026 16:50
Replace the deprecated `val compilerVersion: String by extra` property
delegate with the explicit `extra["compilerVersion"] as String` form
recommended by the Gradle 9.6 upgrading guide. Covers all four `tests/`
composite-build scripts (`tests`, `compiler-extension`, `consumer`,
`in-place-consumer`), matching the form already used in
`gradle-plugin/build.gradle.kts`.

Copyright headers on the touched files were refreshed to 2026 by the
repository's copyright automation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gradle pins `org.jetbrains:annotations` on build script classpaths to
the version used by the Kotlin runtime embedded into Gradle
(`strictly 13.0`, "Pinned to the embedded Kotlin"), while
`kotlinx-coroutines` — brought by Aedile and other transitive
dependencies — requires `23.0.0`. Gradle 9.6 may fail to reconcile the
two declarations depending on the shape of the consumer's dependency
graph: the CoreJvm `.510 -> .521` bump reshaped the graph enough to make
the Compiler Gradle plugin unresolvable in consumer builds unless they
force the module on the build script classpath.

Exclude the module from the Aedile dependency of `:api` and from every
published dependency of `:gradle-plugin`, so consumers need no
workaround. The annotations are compile-time metadata, not needed at
run time; consumers still receive version `13.0` through the
`kotlin-stdlib` edge, which satisfies the pin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This reverts commit 424db14.

The Compiler Gradle plugin now excludes `org.jetbrains:annotations`
from its published dependencies, so the fixture projects resolve
without forcing the module. Keeping the fixtures force-free makes
`functionalTest` guard against regressions of the exclusion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The `consumer` and `in-place-consumer` fixtures put only the Compiler
Gradle plugin on their build script classpaths, and the plugin no
longer carries the `org.jetbrains:annotations:23.0.0` requirement.

The `compiler-extension` fixture keeps the force — its classpath also
holds the CoreJvm Compiler plugin, which still requires the module —
with a comment stating the removal condition.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Addresses the code-review finding: the force was replaced, not
augmented, when the JetBrains Annotations workaround landed. The
integration tests pass without it on the CoreJvm `.521` bump, so the
comment records why it is gone instead of restoring it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Convert the CoreJvm force-removal condition to the Spine `TODO:` format
so it surfaces in TODO sweeps, align the embedded-Kotlin phrasing
between the two exclusion comments, and use `at runtime` per the
style catalog.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 17:47

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 updates the Spine Compiler build and published Gradle plugin metadata to remain resolvable on Gradle 9.6 buildscript classpaths, primarily by excluding org.jetbrains:annotations from published dependency edges (avoiding Gradle’s {strictly 13.0} pin conflicts), while also bumping CoreJvm and refreshing generated dependency reports.

Changes:

  • Bump compiler version to 2.0.0-SNAPSHOT.064 and CoreJvm to 2.0.0-SNAPSHOT.522, including adapting ViewRepository usage to upstream API changes.
  • Exclude org.jetbrains:annotations from the published dependency graph (Aedile in :api, plus published dependencies of :gradle-plugin via a helper).
  • Remove/reduce consumer-side workarounds in test fixtures, and apply Gradle 9.6 deprecation fixes in build scripts and dependency docs.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
version.gradle.kts Bumps the compiler version used across publishing and integration tests.
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt Updates the CoreJvm version to .522.
api/src/main/kotlin/io/spine/tools/compiler/plugin/View.kt Removes the logName() override to match upstream CoreJvm API changes.
api/build.gradle.kts Excludes org.jetbrains:annotations from the Aedile dependency to prevent publishing the conflicting requirement.
gradle-plugin/build.gradle.kts Adds excludeJetBrainsAnnotations() and applies it to published dependencies to keep the plugin resolvable on Gradle 9.6 buildscript classpaths.
backend/build.gradle.kts Updates performanceTest task registration to avoid Gradle 9.6 deprecations.
tests/build.gradle.kts Switches away from deprecated by extra delegate usage for compilerVersion.
tests/consumer/build.gradle.kts Removes deprecated by extra usage for compilerVersion in the buildscript.
tests/in-place-consumer/build.gradle.kts Removes deprecated by extra usage for compilerVersion in the buildscript.
tests/compiler-extension/build.gradle.kts Keeps the annotations force for the CoreJvm Compiler plugin classpath while removing the no-longer-needed grpcContext force; updates compilerVersion access.
docs/dependencies/pom.xml Regenerates pinned versions reflecting the new compiler/CoreJvm/logging versions.
docs/dependencies/dependencies.md Regenerates the dependency/license report reflecting the new published dependency graph (including annotations resolved via the pinned path).
.agents/memory/MEMORY.md Adds a memory index entry documenting the annotations pin diagnosis and mitigation.
.agents/memory/feedback/gradle-annotations-pin-exclusion.md Adds a team-memory writeup documenting the producer-side exclusion pattern and rationale.

alexander-yevsyukov and others added 3 commits July 24, 2026 19:05
Gradle 9.6 deprecates the Kotlin DSL delegated-property helpers. Fix the
two occurrences in the `functionalTest` fixture build scripts:

- `coverage-agent-test`: `val jacocoAgent by configurations.creating`
  becomes `configurations.create("jacocoAgent")`.
- `with-functional-test`: the `by getting` / `by registering` test-suite
  delegates become the direct `register<JvmTestSuite>("functionalTest")`
  API. The empty `test` access existed only to exercise the `by getting`
  delegate, so it and its now-obsolete `@Suppress("UNUSED_VARIABLE")`
  are removed.

Verified by the `LaunchTaskCoverageSpec` and `PluginSpec` functional
tests, which build these fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 18:21

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

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.

@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Jul 24, 2026
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jul 24, 2026
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.89%. Comparing base (a9dfddb) to head (f7df3a2).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #83      +/-   ##
============================================
+ Coverage     76.87%   76.89%   +0.01%     
  Complexity      688      688              
============================================
  Files           205      205              
  Lines          4026     4025       -1     
  Branches        402      402              
============================================
  Hits           3095     3095              
+ Misses          801      800       -1     
  Partials        130      130              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants