Update dependencies, fix type annotations, and add patcher for plugins#379
Conversation
- update version in gradle.properties from 3.25.0 to 3.26.0 - update adventure-api version from 4.26.1 to 5.1.1 in libs.versions.toml - add slf4j as a new dependency in build.gradle.kts - fix type annotations for ClickEvent in multiple files
- implement SurfAdventure5AbiPatcher to update Adventure ABI references in plugins - add methods for patching plugin JAR files and handling plugin metadata - introduce SurfComponentBuilderBridgePatcher for component builder interface adjustments - enhance build.gradle.kts to include new dependencies and patching tasks
…eferences - delete deprecated methods from SurfComponentBuilder related to text and click events - remove SurfComponentBuilderBridgePatcher references from build.gradle.kts and PaperBoostrapper
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d13e46e822
ℹ️ 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".
| inline fun <reified T : Any> requiredService(): T = Services.serviceWithFallback<T>( | ||
| ServiceLoader.load( | ||
| T::class.java, | ||
| getCallerClass()?.classLoader ?: T::class.java.classLoader |
There was a problem hiding this comment.
Use the actual requiredService caller's classloader
When requiredService() is inlined into a service holder, this getCallerClass() call skips one frame too many: getCallerClass() delegates to getCallerClass(0), whose stack walker drops three frames, which only works when there is a non-inlined wrapper frame between it and the real caller. In contexts such as a top-level/companion service singleton initialized from another plugin or loader, this can select the caller's caller classloader instead of the classloader that contains the service interface/provider resources, causing ServiceLoader.load(...) to miss providers and throw ServiceConfigurationError.
Useful? React with 👍 / 👎.
No description provided.