Skip to content

🐛 fix: fix binary compatibility issues caused by #418 - #421

Merged
twisti-dev merged 1 commit into
version/26.2from
fix/binary-compatibility
Sep 10, 2026
Merged

twisti-dev merged 1 commit into
version/26.2from
fix/binary-compatibility

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 10, 2026 17:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T17:44:40.047570Z 9d9b003 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@twisti-dev
twisti-dev merged commit 26ef1af into version/26.2 Sep 10, 2026
8 checks passed
@twisti-dev
twisti-dev deleted the fix/binary-compatibility branch September 10, 2026 17:38

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.

🟢 Approval recommended

The changes are narrowly scoped to ABI restoration via hidden shims and compiler-supported version overloading, with no apparent behavioral risk to current call paths.

Pull request overview

This PR addresses binary compatibility regressions introduced in #418 by reintroducing compatible JVM signatures and stubs in the Paper and Minestom inventory framework APIs, ensuring older compiled plugins can still load and link against the updated artifacts.

Changes:

  • Added Kotlin version-overloading metadata (@OptIn(ExperimentalVersionOverloading::class) + @IntroducedAt) to generate backward-compatible constructor/copy overloads for view settings data classes.
  • Restored removed/changed API surface via hidden binary-compatibility shims (a hidden constructor on ViewContainerTitleComponent and a hidden ViewContainerBackHintComponent stub).
  • Bumped patch version from 3.43.0 to 3.43.1.
File summaries
File Description
surf-api-paper/surf-api-paper/src/main/kotlin/dev/slne/surf/api/paper/inventory/framework/view/settings/SimpleViewSettings.kt Enables version overloading and marks newer parameters as introduced to preserve older JVM constructor signatures.
surf-api-paper/surf-api-paper/src/main/kotlin/dev/slne/surf/api/paper/inventory/framework/view/settings/PaginatedViewSettings.kt Same compatibility treatment for paginated settings, including pagination-specific fields.
surf-api-paper/surf-api-paper/src/main/kotlin/dev/slne/surf/api/paper/inventory/framework/view/container/component/components/ViewContainerTitleComponent.kt Adds a hidden constructor matching an older JVM signature for binary compatibility.
surf-api-paper/surf-api-paper/src/main/kotlin/dev/slne/surf/api/paper/inventory/framework/view/container/component/components/ViewContainerBackHintComponent.kt Reintroduces the removed component as a hidden no-op stub to prevent NoClassDefFoundError.
surf-api-paper/surf-api-paper/api/surf-api-paper.api Updates API dump to reflect added compatibility stubs/overloads.
surf-api-minestom/src/main/kotlin/dev/slne/surf/api/minestom/inventory/framework/view/settings/SimpleViewSettings.kt Mirrors Paper’s version-overloading changes for Minestom simple settings.
surf-api-minestom/src/main/kotlin/dev/slne/surf/api/minestom/inventory/framework/view/settings/PaginatedViewSettings.kt Mirrors Paper’s version-overloading changes for Minestom paginated settings.
surf-api-minestom/src/main/kotlin/dev/slne/surf/api/minestom/inventory/framework/view/container/component/components/ViewContainerTitleComponent.kt Mirrors Paper’s hidden binary-compat constructor for Minestom.
surf-api-minestom/src/main/kotlin/dev/slne/surf/api/minestom/inventory/framework/view/container/component/components/ViewContainerBackHintComponent.kt Mirrors Paper’s hidden no-op back-hint stub for Minestom.
surf-api-minestom/api/surf-api-minestom.api Updates API dump to reflect added compatibility stubs/overloads.
gradle.properties Increments project version to 3.43.1.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d9b00309a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +36 to +40
@IntroducedAt("3.43.0") override val headerTextColor: TextColor = SurfViewSettingsDefaults.DEFAULT_HEADER_TEXT_COLOR,
@IntroducedAt("3.43.0") override val headerFontMetrics: ViewFontMetrics = SurfViewSettingsDefaults.DEFAULT_HEADER_FONT_METRICS,
@IntroducedAt("3.43.0") override val rowFontMetrics: ViewFontMetrics = SurfViewSettingsDefaults.DEFAULT_ROW_FONT_METRICS,
@IntroducedAt("3.43.0") override val headerGeometry: ViewHeaderGeometry = SurfViewSettingsDefaults.DEFAULT_HEADER_GEOMETRY,
@IntroducedAt("3.43.0") override val backgroundGlyph: Boolean = SurfViewSettingsDefaults.DEFAULT_BACKGROUND_GLYPH,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the legacy data-class component methods

For plugins compiled against 3.42.x that destructure SimpleViewSettings, these inserted primary-constructor properties shift the generated componentN() methods. The checked API confirms that version overloading restores constructors and copy, but not the old components: for example, the former component3(): Boolean is now component3(): TextColor, while the still-linkable component7(): Boolean now returns backgroundGlyph instead of navigateBackOnOutsideClick. Such binaries therefore either throw NoSuchMethodError or silently read the wrong value. PaginatedViewSettings and both Paper mirrors have the same problem, so the legacy component descriptors/ordering also need to be preserved.

Useful? React with 👍 / 👎.

Comment on lines +116 to +120
) : this(
title = text(title),
font = font,
textAlignment = textAlignment,
metrics = ViewFontMetrics(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retain the legacy title constructor's rendering defaults

When a plugin compiled against the old five-argument constructor uses LEFT or RIGHT alignment, this delegation silently adopts the new default geometry and color rather than the constructor's former behavior. Before #418 it aligned inside leftShift=31, padding=2, containerWidth=100 and rendered white; this call instead uses ViewHeaderGeometry.DEFAULT (-8, 0, 176) and the 0x404040 default color, moving left/right-aligned titles by roughly 40 pixels and recoloring them. Pass the legacy geometry and color explicitly in this compatibility constructor; the Paper mirror has the same issue.

Useful? React with 👍 / 👎.

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.

2 participants