Skip to content

Conversation

@alexcol23
Copy link

This commit enables GraalVM native-image compilation for applications using the Split.io Java SDK.

Problem:
The Split SDK shades Guava to split.com.google.common.* to avoid dependency conflicts. However, this shaded Guava lacks the GraalVM native-image configuration that standard Guava provides, causing build failures with errors like:
'Discovered unresolved type: split.com.google.common.util.concurrent.SettableFuture'

Root Cause:
Standard Guava (com.google.common.) includes GraalVM native-image configuration in META-INF/native-image/. When the SDK shades Guava to split.com.google.common., this configuration is lost.

Solution:
Remove Guava from the shade plugin configuration. Guava remains as a transitive dependency, allowing applications to use the standard Guava library which has proper GraalVM native-image support.

Changes:

  • Remove com.google.guava:guava from shade plugin includes
  • Remove org.checkerframework:* from shade plugin includes
  • Remove com.google -> split.com.google relocation
  • Remove org.checkerframework -> split.org.checkerframework relocation
  • Update version to 4.18.2-graalvm to distinguish from upstream

Testing:

  • Built native image with Quarkus 3.27.1 + Mandrel JDK-23
  • Verified Split client works correctly at runtime
  • Tested feature flag resolution in native image

Reference: #614

This commit enables GraalVM native-image compilation for applications
using the Split.io Java SDK.

Problem:
The Split SDK shades Guava to split.com.google.common.* to avoid
dependency conflicts. However, this shaded Guava lacks the GraalVM
native-image configuration that standard Guava provides, causing
build failures with errors like:
  'Discovered unresolved type: split.com.google.common.util.concurrent.SettableFuture'

Root Cause:
Standard Guava (com.google.common.*) includes GraalVM native-image
configuration in META-INF/native-image/. When the SDK shades Guava
to split.com.google.common.*, this configuration is lost.

Solution:
Remove Guava from the shade plugin configuration. Guava remains as
a transitive dependency, allowing applications to use the standard
Guava library which has proper GraalVM native-image support.

Changes:
- Remove com.google.guava:guava from shade plugin includes
- Remove org.checkerframework:* from shade plugin includes
- Remove com.google -> split.com.google relocation
- Remove org.checkerframework -> split.org.checkerframework relocation
- Update version to 4.18.2-graalvm to distinguish from upstream

Testing:
- Built native image with Quarkus 3.27.1 + Mandrel JDK-23
- Verified Split client works correctly at runtime
- Tested feature flag resolution in native image

Reference: splitio#614
@alexcol23 alexcol23 requested a review from a team as a code owner January 14, 2026 19:16
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