Skip to content

fix: initialize all org.slf4j classes at build time for GraalVM native image#120

Merged
linroid merged 1 commit intomainfrom
fix/graalvm-slf4j-init
Feb 24, 2026
Merged

fix: initialize all org.slf4j classes at build time for GraalVM native image#120
linroid merged 1 commit intomainfrom
fix/graalvm-slf4j-init

Conversation

@linroid
Copy link
Owner

@linroid linroid commented Feb 24, 2026

Summary

  • Replace individual --initialize-at-build-time entries for org.slf4j.LoggerFactory and org.slf4j.helpers.Reporter with a single org.slf4j package-level entry
  • Fixes org.slf4j.MarkerFactory build-time initialization error in CLI native image build (run #22354123577)

Root Cause

Logback's build-time initialization transitively triggers org.slf4j.MarkerFactory to initialize. Since MarkerFactory wasn't explicitly listed in the build-time init args, GraalVM treated it as a run-time class that was incorrectly initialized at build time, failing the native image build.

Test plan

  • Re-run the release workflow and verify all CLI native image builds pass

…e image

Logback's build-time initialization transitively triggers
org.slf4j.MarkerFactory, which was not in the explicit build-time init
list. Replace individual org.slf4j class entries with the whole org.slf4j
package to prevent this and similar future issues.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@linroid linroid merged commit 543ba18 into main Feb 24, 2026
4 checks passed
@linroid linroid deleted the fix/graalvm-slf4j-init branch February 24, 2026 14:14
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