Skip to content

🔧 chore: update version to 3.27.5 and improve service loader fallback…#387

Merged
twisti-dev merged 2 commits into
version/26.2from
fix/adventure-4-backwards-comp
Jun 21, 2026
Merged

🔧 chore: update version to 3.27.5 and improve service loader fallback…#387
twisti-dev merged 2 commits into
version/26.2from
fix/adventure-4-backwards-comp

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

… method

  • increment version in gradle.properties to 3.27.5
  • refactor requiredService function to simplify service loading logic
  • add deprecated method for binary compatibility with existing code

… method

- increment version in gradle.properties to 3.27.5
- refactor requiredService function to simplify service loading logic
- add deprecated method for binary compatibility with existing code
@twisti-dev twisti-dev merged commit e84d986 into version/26.2 Jun 21, 2026
0 of 3 checks passed
@twisti-dev twisti-dev deleted the fix/adventure-4-backwards-comp branch June 21, 2026 22:58

@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: 36168b4e23

ℹ️ 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".

@Deprecated("Binary compatibility", ReplaceWith("serviceWithFallback(loader, type)"), DeprecationLevel.HIDDEN)
@PublishedApi
internal fun <T : Any> serviceWithFallback(loader: ServiceLoader<T>, type: Class<T>): T? {
return serviceWithFallback(type)

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 Preserve the caller-provided service loader

For already-compiled callers of the previous inline requiredService, the caller class loader is passed in through this loader argument. Delegating to the one-arg overload discards that loader and reloads with type.classLoader, so any existing caller whose META-INF/services entry is only visible from its own/plugin class loader will start throwing ServiceConfigurationError after upgrading. Please iterate the supplied loader here to preserve the old binary-compatible behavior.

Useful? React with 👍 / 👎.

}

@PublishedApi
internal fun <T : Any> serviceWithFallback(type: Class<T>): T? {

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 Update the API dump for the new ABI

This module applies api-validation, and the tracked surf-api-core/surf-api-core/api/surf-api-core.api still only lists the existing two-arg serviceWithFallback entry. Because @PublishedApi internal members are emitted in the public ABI, adding this overload without updating the API dump will make :surf-api-core:surf-api-core:apiCheck fail for builds/releases with the expected JDK. Please update the dump with the new signature or avoid adding a new ABI entry.

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.

1 participant